From 70b5d6be099b823890a71ff8d57a68fd44ed8394 Mon Sep 17 00:00:00 2001 From: osquallo Date: Sun, 22 Mar 2020 11:54:47 +0100 Subject: [PATCH] =?UTF-8?q?EDIT=20appueyer=20sur=20jouer=20sans=20avoir=20?= =?UTF-8?q?entr=C3=A9=20de=20username=20et=20de=20password=20lance=20le=20?= =?UTF-8?q?jeu=20sans=20se=20connecter=20pour=20pouvoir=20tester=20=20sans?= =?UTF-8?q?=20spam=20le=20serveur.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scenes/game/game.gd | 4 +--- scenes/game/game.tscn | 38 +++++++++++++++++++------------------- scenes/main/main.gd | 3 +++ 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/scenes/game/game.gd b/scenes/game/game.gd index 33dcd8a..7164107 100644 --- a/scenes/game/game.gd +++ b/scenes/game/game.gd @@ -28,17 +28,15 @@ func _input( event ): rotation.y += self.player_rotation_speed elif event.is_action( "turn_right" ): rotation.y -= self.player_rotation_speed - + $creatures/player.turn( rotation ) $creatures/player.move( movment ) - func load_player( filename ): $creatures/player.load_creature( filename ) - func _on_debug_window_time_of_day_changed(value): $sky/viewport/sky.set_day_time_hours(( value )) diff --git a/scenes/game/game.tscn b/scenes/game/game.tscn index a69b23a..be9a962 100644 --- a/scenes/game/game.tscn +++ b/scenes/game/game.tscn @@ -12,18 +12,18 @@ [sub_resource type="OpenSimplexNoise" id=1] period = 8.0 -[sub_resource type="NoiseTexture" id=4] +[sub_resource type="NoiseTexture" id=2] resource_local_to_scene = true width = 1280 height = 720 seamless = true noise = SubResource( 1 ) -[sub_resource type="ShaderMaterial" id=5] +[sub_resource type="ShaderMaterial" id=3] resource_local_to_scene = true shader = ExtResource( 5 ) -shader_param/iTime = 169.046 -shader_param/iFrame = 6399 +shader_param/iTime = 19.1832 +shader_param/iFrame = 657 shader_param/COVERAGE = 0.5 shader_param/THICKNESS = 25.0 shader_param/ABSORPTION = 1.031 @@ -31,7 +31,7 @@ shader_param/STEPS = 50 shader_param/earth_radius_km = 6371.0 shader_param/atmo_radius_km = 6471.0 shader_param/cam_height_m = 1.8 -shader_param/sun_pos = Vector3( -9.32094, -70.9947, 69.806 ) +shader_param/sun_pos = Vector3( -1.15706e-06, 100, 8.66537e-06 ) shader_param/sun_intensity = 42.0 shader_param/rayleigh_coeff = Vector3( 5.5, 13, 22.4 ) shader_param/mie_coeff = 21.0 @@ -39,23 +39,23 @@ shader_param/rayleigh_scale = 800.0 shader_param/mie_scale = 120.0 shader_param/mie_scatter_dir = 0.758 shader_param/rotate_night_sky = null -shader_param/iChannel0 = SubResource( 4 ) +shader_param/iChannel0 = SubResource( 2 ) -[sub_resource type="ImageTexture" id=6] +[sub_resource type="ImageTexture" id=4] resource_local_to_scene = true size = Vector2( 1280, 720 ) -[sub_resource type="ViewportTexture" id=2] +[sub_resource type="ViewportTexture" id=5] viewport_path = NodePath("sky/viewport") -[sub_resource type="PanoramaSky" id=3] +[sub_resource type="PanoramaSky" id=6] resource_local_to_scene = true -panorama = SubResource( 2 ) +panorama = SubResource( 5 ) [sub_resource type="Environment" id=7] resource_local_to_scene = true background_mode = 2 -background_sky = SubResource( 3 ) +background_sky = SubResource( 6 ) background_energy = 0.1 ambient_light_energy = 3.82 fog_color = Color( 0.247059, 0.00784314, 0.592157, 1 ) @@ -66,7 +66,7 @@ fog_transmit_enabled = true [sub_resource type="QuadMesh" id=8] size = Vector2( 2, 2 ) -[sub_resource type="ShaderMaterial" id=10] +[sub_resource type="ShaderMaterial" id=9] shader = ExtResource( 7 ) shader_param/mist_level = 0.0 shader_param/mist_color = Color( 1, 0, 1, 1 ) @@ -83,18 +83,18 @@ size = Vector2( 1280, 720 ) render_target_update_mode = 3 [node name="sky" type="Sprite" parent="sky/viewport"] -material = SubResource( 5 ) -texture = SubResource( 6 ) +material = SubResource( 3 ) +texture = SubResource( 4 ) offset = Vector2( 640, 360 ) script = ExtResource( 6 ) editor_clouds_playing = true -day_time_hours = 21.0154 +day_time_hours = 12.0 directional_light_node_path = NodePath("../../sun") -sun_position = Vector3( -9.32094, -70.9947, 69.806 ) +sun_position = Vector3( -1.15706e-06, 100, 8.66537e-06 ) [node name="sun" type="DirectionalLight" parent="sky"] -transform = Transform( 0.991203, -0.0939627, -0.0932094, 0, 0.704255, -0.709947, 0.132352, 0.703701, 0.69806, -9.32094, -70.9947, 69.806 ) -light_energy = 0.0 +transform = Transform( 0.991203, 0.132352, -1.15706e-08, 0, 8.74228e-08, 1, 0.132352, -0.991203, 8.66537e-08, -1.15706e-06, 100, 8.66537e-06 ) +light_energy = 1.0 shadow_enabled = true [node name="world_environment" type="WorldEnvironment" parent="."] @@ -117,7 +117,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 14.7098, 0 ) cast_shadow = 0 extra_cull_margin = 16384.0 mesh = SubResource( 8 ) -material/0 = SubResource( 10 ) +material/0 = SubResource( 9 ) [node name="debug_window" parent="." instance=ExtResource( 8 )] [connection signal="mist_level_changed" from="debug_window" to="." method="_on_debug_window_mist_level_changed"] diff --git a/scenes/main/main.gd b/scenes/main/main.gd index 412783f..d432c6c 100644 --- a/scenes/main/main.gd +++ b/scenes/main/main.gd @@ -97,6 +97,9 @@ func _on_main_menu_play_pressed(): var password = $main_menu/screen_box/login_box/password.text; if username != null and username != "" and password != null and password != "": Connection.do_request(username, password) + else: + self.load_scene( "res://scenes/interfaces/creatures_menu/creatures_menu_ui.tscn" ) + func _on_creatures_menu_ui_new_pressed( slot ):