diff --git a/portail.gd b/portail.gd index f1a1ca5..2e45f86 100644 --- a/portail.gd +++ b/portail.gd @@ -1,6 +1,6 @@ extends Spatial - +export( String ) var scene_path = "" func _on_area_body_shape_entered(body_id, body, body_shape, area_shape): print( "PORTAIL AREA BODY SHAPE ENTERED !!!!!" ) @@ -8,7 +8,8 @@ func _on_area_body_shape_entered(body_id, body, body_shape, area_shape): print( "body: "+str(body) ) print( "body_shape: "+str(body_shape) ) print( "area_shape: "+str(area_shape) ) - if body == character: - global.change_level( "game", "res://test_scene/test_scene.tscn", null, global.current_map ) + if body == character and not scene_path == "": +# global.change_level( "game", "res://test_scene/test_scene.tscn", null, global.current_map ) + global.change_level( "game", scene_path, null, global.current_map ) diff --git a/scenes/GUI/GUI.gd b/scenes/GUI/GUI.gd index 22e1b6e..32bb802 100644 --- a/scenes/GUI/GUI.gd +++ b/scenes/GUI/GUI.gd @@ -3,7 +3,7 @@ extends MarginContainer signal logout_button_pressed func _ready(): - pause() +# pause() self.connect( "logout_button_pressed", global, "_on_logout_button_pressed" ) func _on_Home_setting_pressed(): diff --git a/scenes/Game/Game.tscn b/scenes/Game/Game.tscn index 75e5c0d..603e70e 100644 --- a/scenes/Game/Game.tscn +++ b/scenes/Game/Game.tscn @@ -68,7 +68,7 @@ auto_exposure_scale = 0.4 auto_exposure_min_luma = 0.05 auto_exposure_max_luma = 8.0 auto_exposure_speed = 0.5 -ss_reflections_enabled = true +ss_reflections_enabled = false ss_reflections_max_steps = 64 ss_reflections_fade_in = 0.15 ss_reflections_fade_out = 2.0 @@ -1012,7 +1012,7 @@ material = SubResource( 32 ) 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" ] @@ -1336,6 +1336,12 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -7.67816, 0.00211585, 0 ) [node name="portail" parent="World" index="9" instance=ExtResource( 14 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 12.1976 ) +scene_path = "res://test_scene/test_scene.tscn" + +[node name="portail2" parent="World" index="10" instance=ExtResource( 14 )] + +transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5.01158, 0, 12.1976 ) +scene_path = "res://test_grid_map/test_grid_map.tscn" [connection signal="sleeping_state_changed" from="World/Box" to="World/Box" method="_on_Box_sleeping_state_changed"] diff --git a/scenes/Game/portail/portail.tscn b/scenes/Game/portail/portail.tscn index cc3d643..c4ba466 100644 --- a/scenes/Game/portail/portail.tscn +++ b/scenes/Game/portail/portail.tscn @@ -66,9 +66,10 @@ _sections_unfolded = [ "Albedo", "Metallic", "Roughness" ] points = PoolVector3Array( -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, -1, -1, -1, -1, -1, 1, -1, 1, -1, -1 ) -[node name="portail" type="Spatial" index="0"] +[node name="portail" type="Spatial"] script = ExtResource( 1 ) +scene_path = "" [node name="mesh_instance" type="MeshInstance" parent="." index="0"] diff --git a/test_scene/test_scene.tscn b/test_scene/test_scene.tscn index a2cc48d..5b2ccf0 100644 --- a/test_scene/test_scene.tscn +++ b/test_scene/test_scene.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=8 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://test_scene/test_scene.gd" type="Script" id=1] [ext_resource path="res://test_scene/kit_test/kit_test_4way.tscn" type="PackedScene" id=2] @@ -7,6 +7,7 @@ [ext_resource path="res://test_scene/kit_test/kit_test_2way.tscn" type="PackedScene" id=5] [ext_resource path="res://test_scene/kit_test/kit_test_1way.tscn" type="PackedScene" id=6] [ext_resource path="res://scenes/GUI/GUI.tscn" type="PackedScene" id=7] +[ext_resource path="res://scenes/Game/portail/portail.tscn" type="PackedScene" id=8] [node name="test_scene" type="Node"] @@ -151,4 +152,9 @@ _sections_unfolded = [ "Transform" ] [node name="GUI" parent="." index="2" instance=ExtResource( 7 )] +[node name="portail" parent="." index="3" instance=ExtResource( 8 )] + +transform = Transform( -2.18557e-008, 0, -0.5, 0, 0.5, 0, 0.5, 0, -2.18557e-008, -2, -1, -2 ) +scene_path = "res://game_scene/game_scene.tscn" +