From 0922f6f5a53d9ffafa2cefae27f00890e5f4985a Mon Sep 17 00:00:00 2001 From: osquallo Date: Fri, 27 Jul 2018 21:01:34 +0200 Subject: [PATCH] diverses modif. --- scenes/Game/Character/Character.gd | 7 ++++--- scenes/Game/Game.tscn | 8 +++++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/scenes/Game/Character/Character.gd b/scenes/Game/Character/Character.gd index f5de84c..1db63a4 100644 --- a/scenes/Game/Character/Character.gd +++ b/scenes/Game/Character/Character.gd @@ -20,6 +20,7 @@ var MOUSE_SENSITIVITY = 0.05 func _ready(): camera_rotation = $Camera_rotation_helper camera = $Camera_rotation_helper/Camera + camera.make_current() flashlight = $MeshInstance/Flashlight func _process(delta): @@ -90,11 +91,11 @@ func process_movement(delta): obj.apply_impulse( collision_info.position, -collision_info.normal*delta ) if not obj.get_node( "MeshInstance" ).get_surface_material(0).get("albedo_color") == null: obj.get_node( "MeshInstance" ).get_surface_material(0).albedo_color = Color( 1, 0, 1, 1 ) - get_node( "../../GUI/HUD/Jauges/douleur/ProgressBar" ).value += 0.1 + get_node( "../../GUI/HUD/Jauges/douleur/ProgressBar" ).value += 0.25 if get_node( "../../GUI/HUD/Jauges/douleur/ProgressBar" ).value >= 100: - get_node( "../../GUI/HUD/Jauges/trauma/ProgressBar" ).value += 0.1 + get_node( "../../GUI/HUD/Jauges/trauma/ProgressBar" ).value += 0.25 if get_node( "../../GUI/HUD/Jauges/trauma/ProgressBar" ).value >= 100: - get_node( "../../GUI/HUD/Jauges/oubli/ProgressBar" ).value += 0.1 + get_node( "../../GUI/HUD/Jauges/oubli/ProgressBar" ).value += 0.25 # obj.get_node( "MeshInstance" ).get_surface_material(0).albedo_color = Color( collision_info.normal ) # if obj.has_method( "hit" ): # obj.hit( collision_info.position, collision_info.collider_velocity ) diff --git a/scenes/Game/Game.tscn b/scenes/Game/Game.tscn index 6a4ed87..43df74c 100644 --- a/scenes/Game/Game.tscn +++ b/scenes/Game/Game.tscn @@ -242,14 +242,20 @@ material = SubResource( 8 ) custom_aabb = AABB( 0, 0, 0, 0, 0, 0 ) size = Vector2( 0.4, 0.4 ) -[node name="Game" type="Spatial"] +[node name="Game" type="Spatial" index="0"] + +_sections_unfolded = [ "Transform" ] [node name="Character" parent="." index="0" instance=ExtResource( 1 )] [node name="World" type="Spatial" parent="." index="1"] +_sections_unfolded = [ "Transform", "Visibility" ] + [node name="Terrain" parent="World" index="0" instance=ExtResource( 2 )] +_sections_unfolded = [ "Transform" ] + [node name="OmniLight" type="OmniLight" parent="World" index="1"] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 7.46929, 4.14904, -7.50301 )