From 342b806370814ed8751ceafd51f0f6c976287272 Mon Sep 17 00:00:00 2001 From: osquallo Date: Sat, 21 Mar 2020 14:24:59 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20d'un=20bug=20li=C3=A9=20au=20solei?= =?UTF-8?q?l=20qui=20ne=20se=20repositionnait=20pas=20correctement=20en=20?= =?UTF-8?q?fonction=20de=20l'heure.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/game/game.tscn | 6 +++--- scenes/game/sky.gd | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scenes/game/game.tscn b/scenes/game/game.tscn index f3f8a6a..b5b6168 100644 --- a/scenes/game/game.tscn +++ b/scenes/game/game.tscn @@ -20,8 +20,8 @@ noise = SubResource( 1 ) [sub_resource type="ShaderMaterial" id=5] resource_local_to_scene = true shader = ExtResource( 5 ) -shader_param/iTime = 6165.88 -shader_param/iFrame = 199437 +shader_param/iTime = 6392.37 +shader_param/iFrame = 208147 shader_param/COVERAGE = 0.5 shader_param/THICKNESS = 25.0 shader_param/ABSORPTION = 1.031 @@ -72,7 +72,7 @@ texture = SubResource( 6 ) offset = Vector2( 640, 360 ) script = ExtResource( 6 ) editor_clouds_playing = true -day_time_hours = 3.67154 +day_time_hours = 14.0283 directional_light_node_path = NodePath("../../../directional_light") sun_position = Vector3( -1.15706e-06, 100, 8.66537e-06 ) diff --git a/scenes/game/sky.gd b/scenes/game/sky.gd index 09d485d..1fa210b 100644 --- a/scenes/game/sky.gd +++ b/scenes/game/sky.gd @@ -23,9 +23,9 @@ func _process( delta ): self.material.set("shader_param/iTime", iTime) self.material.set("shader_param/iFrame", iFrame) - day_time_hours += delta + self.set_day_time_hours( self.day_time_hours + delta ) if day_time_hours >= 24: - day_time_hours = 0 + self.set_day_time_hours( 0 ) func cov_scb(value):