EDIT appueyer sur jouer sans avoir entré de username et de password lance le jeu sans se connecter pour pouvoir tester sans spam le serveur.

This commit is contained in:
osquallo 2020-03-22 11:54:47 +01:00
parent 83881a821f
commit 70b5d6be09
3 changed files with 23 additions and 22 deletions

View file

@ -28,17 +28,15 @@ func _input( event ):
rotation.y += self.player_rotation_speed rotation.y += self.player_rotation_speed
elif event.is_action( "turn_right" ): elif event.is_action( "turn_right" ):
rotation.y -= self.player_rotation_speed rotation.y -= self.player_rotation_speed
$creatures/player.turn( rotation ) $creatures/player.turn( rotation )
$creatures/player.move( movment ) $creatures/player.move( movment )
func load_player( filename ): func load_player( filename ):
$creatures/player.load_creature( filename ) $creatures/player.load_creature( filename )
func _on_debug_window_time_of_day_changed(value): func _on_debug_window_time_of_day_changed(value):
$sky/viewport/sky.set_day_time_hours(( value )) $sky/viewport/sky.set_day_time_hours(( value ))

View file

@ -12,18 +12,18 @@
[sub_resource type="OpenSimplexNoise" id=1] [sub_resource type="OpenSimplexNoise" id=1]
period = 8.0 period = 8.0
[sub_resource type="NoiseTexture" id=4] [sub_resource type="NoiseTexture" id=2]
resource_local_to_scene = true resource_local_to_scene = true
width = 1280 width = 1280
height = 720 height = 720
seamless = true seamless = true
noise = SubResource( 1 ) noise = SubResource( 1 )
[sub_resource type="ShaderMaterial" id=5] [sub_resource type="ShaderMaterial" id=3]
resource_local_to_scene = true resource_local_to_scene = true
shader = ExtResource( 5 ) shader = ExtResource( 5 )
shader_param/iTime = 169.046 shader_param/iTime = 19.1832
shader_param/iFrame = 6399 shader_param/iFrame = 657
shader_param/COVERAGE = 0.5 shader_param/COVERAGE = 0.5
shader_param/THICKNESS = 25.0 shader_param/THICKNESS = 25.0
shader_param/ABSORPTION = 1.031 shader_param/ABSORPTION = 1.031
@ -31,7 +31,7 @@ shader_param/STEPS = 50
shader_param/earth_radius_km = 6371.0 shader_param/earth_radius_km = 6371.0
shader_param/atmo_radius_km = 6471.0 shader_param/atmo_radius_km = 6471.0
shader_param/cam_height_m = 1.8 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/sun_intensity = 42.0
shader_param/rayleigh_coeff = Vector3( 5.5, 13, 22.4 ) shader_param/rayleigh_coeff = Vector3( 5.5, 13, 22.4 )
shader_param/mie_coeff = 21.0 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_scale = 120.0
shader_param/mie_scatter_dir = 0.758 shader_param/mie_scatter_dir = 0.758
shader_param/rotate_night_sky = null 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 resource_local_to_scene = true
size = Vector2( 1280, 720 ) size = Vector2( 1280, 720 )
[sub_resource type="ViewportTexture" id=2] [sub_resource type="ViewportTexture" id=5]
viewport_path = NodePath("sky/viewport") viewport_path = NodePath("sky/viewport")
[sub_resource type="PanoramaSky" id=3] [sub_resource type="PanoramaSky" id=6]
resource_local_to_scene = true resource_local_to_scene = true
panorama = SubResource( 2 ) panorama = SubResource( 5 )
[sub_resource type="Environment" id=7] [sub_resource type="Environment" id=7]
resource_local_to_scene = true resource_local_to_scene = true
background_mode = 2 background_mode = 2
background_sky = SubResource( 3 ) background_sky = SubResource( 6 )
background_energy = 0.1 background_energy = 0.1
ambient_light_energy = 3.82 ambient_light_energy = 3.82
fog_color = Color( 0.247059, 0.00784314, 0.592157, 1 ) fog_color = Color( 0.247059, 0.00784314, 0.592157, 1 )
@ -66,7 +66,7 @@ fog_transmit_enabled = true
[sub_resource type="QuadMesh" id=8] [sub_resource type="QuadMesh" id=8]
size = Vector2( 2, 2 ) size = Vector2( 2, 2 )
[sub_resource type="ShaderMaterial" id=10] [sub_resource type="ShaderMaterial" id=9]
shader = ExtResource( 7 ) shader = ExtResource( 7 )
shader_param/mist_level = 0.0 shader_param/mist_level = 0.0
shader_param/mist_color = Color( 1, 0, 1, 1 ) shader_param/mist_color = Color( 1, 0, 1, 1 )
@ -83,18 +83,18 @@ size = Vector2( 1280, 720 )
render_target_update_mode = 3 render_target_update_mode = 3
[node name="sky" type="Sprite" parent="sky/viewport"] [node name="sky" type="Sprite" parent="sky/viewport"]
material = SubResource( 5 ) material = SubResource( 3 )
texture = SubResource( 6 ) texture = SubResource( 4 )
offset = Vector2( 640, 360 ) offset = Vector2( 640, 360 )
script = ExtResource( 6 ) script = ExtResource( 6 )
editor_clouds_playing = true editor_clouds_playing = true
day_time_hours = 21.0154 day_time_hours = 12.0
directional_light_node_path = NodePath("../../sun") 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"] [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 ) 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 = 0.0 light_energy = 1.0
shadow_enabled = true shadow_enabled = true
[node name="world_environment" type="WorldEnvironment" parent="."] [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 cast_shadow = 0
extra_cull_margin = 16384.0 extra_cull_margin = 16384.0
mesh = SubResource( 8 ) mesh = SubResource( 8 )
material/0 = SubResource( 10 ) material/0 = SubResource( 9 )
[node name="debug_window" parent="." instance=ExtResource( 8 )] [node name="debug_window" parent="." instance=ExtResource( 8 )]
[connection signal="mist_level_changed" from="debug_window" to="." method="_on_debug_window_mist_level_changed"] [connection signal="mist_level_changed" from="debug_window" to="." method="_on_debug_window_mist_level_changed"]

View file

@ -97,6 +97,9 @@ func _on_main_menu_play_pressed():
var password = $main_menu/screen_box/login_box/password.text; var password = $main_menu/screen_box/login_box/password.text;
if username != null and username != "" and password != null and password != "": if username != null and username != "" and password != null and password != "":
Connection.do_request(username, 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 ): func _on_creatures_menu_ui_new_pressed( slot ):