diff --git a/global.gd b/global.gd index 8ac8400..f72b7e1 100644 --- a/global.gd +++ b/global.gd @@ -64,7 +64,7 @@ func load_scene( scene_path ): func change_level( p_next_scene_path, p_parent_next_scene = null, p_old_scene = null ): character.hide() get_node("background_loader").show() - + print() print( "change_level: " ) if p_old_scene: @@ -83,10 +83,8 @@ func change_level( p_next_scene_path, p_parent_next_scene = null, p_old_scene = if old_scene: unload_scene( old_scene ) - - - - wait_frames = 10 + + wait_frames = 1 ######## @@ -130,7 +128,7 @@ func _process( time ): func _input( event ): - if event is InputEventKey : + if event is InputEventKey and not event.is_echo(): if event.is_action_pressed("test_change_map_1"): global.change_level( "res://test_scene/test_scene.tscn", null, current_map ) elif event.is_action_pressed("test_change_map_2"): diff --git a/global.tscn b/global.tscn index 0fda1bc..b855f3b 100644 --- a/global.tscn +++ b/global.tscn @@ -3,7 +3,7 @@ [ext_resource path="res://global.gd" type="Script" id=1] [ext_resource path="res://background_loader_scene/background_loader.tscn" type="PackedScene" id=2] -[node name="global" type="Node" index="0"] +[node name="global" type="Node"] pause_mode = 2 script = ExtResource( 1 ) diff --git a/project.godot b/project.godot index 208a4fe..25938e8 100644 --- a/project.godot +++ b/project.godot @@ -85,7 +85,7 @@ test_change_map_1=[ Object(InputEventKey,"resource_local_to_scene":false,"resour ] test_change_map_2=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777250,"unicode":0,"echo":false,"script":null) ] -test_change_map_3=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777251,"unicode":0,"echo":false,"script":null) +test_change_map_3=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777252,"unicode":0,"echo":false,"script":null) ] [locale] diff --git a/scenes/GUI/Help/Help.gd b/scenes/GUI/Help/Help.gd index 56562e2..fd0f687 100644 --- a/scenes/GUI/Help/Help.gd +++ b/scenes/GUI/Help/Help.gd @@ -4,8 +4,8 @@ extends MarginContainer # var a = 2 # var b = "textvar" -const ACTION_LIST = [ "ui_debug_window", "ui_music_controls", "hide_char", "ui_hide_all", "move_up", "move_down", "move_left", "move_right", "fly_up", "fly_down","game_flashlight", "ui_pause", "ui_reload", "ui_free_cursor", "ui_quit", "test_change_map_1", "test_change_map_2" ] -const ACTION_TEXT = [ "show/hide debug", "show/hide music", "Hide/show character", "hide/show UI", "move up", "move down", "move left", "move right", "fly up", "fly down", "on/off flashlight", "pause/play", "reload the scene", "free/capture mouse cursor", "quit", "test scene", "test grid map" ] +const ACTION_LIST = [ "ui_debug_window", "ui_music_controls", "hide_char", "ui_hide_all", "move_up", "move_down", "move_left", "move_right", "fly_up", "fly_down","game_flashlight", "ui_pause", "ui_reload", "ui_free_cursor", "ui_quit", "test_change_map_1", "test_change_map_2", "test_change_map_3" ] +const ACTION_TEXT = [ "show/hide debug", "show/hide music", "Hide/show character", "hide/show UI", "move up", "move down", "move left", "move right", "fly up", "fly down", "on/off flashlight", "pause/play", "reload the scene", "free/capture mouse cursor", "quit", "test scene", "test grid map", "main test scene" ] func _ready(): _on_Refresh_pressed() diff --git a/scenes/GUI/Help/Help.tscn b/scenes/GUI/Help/Help.tscn index 20f7fd4..7bd2672 100644 --- a/scenes/GUI/Help/Help.tscn +++ b/scenes/GUI/Help/Help.tscn @@ -14,7 +14,7 @@ flags = 4 gradient = SubResource( 1 ) width = 2048 -[node name="Help" type="MarginContainer"] +[node name="Help" type="MarginContainer" index="0"] anchor_left = 0.0 anchor_top = 0.0