Add show_menu and hide_menu ESC commands
Fixes godot-escoria/escoria-issues#48 Fix: tween was stopped_all before starting Fix: reload locale from settings in ESCGame Since main menu and pause menu are now loaded from ESCGame and not from escoria.gd, this must be done here. Fix: small crash in load game But save and load are broken at the moment... Fix: check save and load after main menu changes Required fixes Fix: manage the game scene better in show and hide_menu Enh: transition back in to the previous room if there was one Fix a bug occurring where change_scene awaits forever for setup to end Reworked change_scene and esc_room implementation to avoid yielding Added a controller variable to allow new event run in events_manager Don't empty the events queue if the running_event was interrupted Fixed transitions and automatic transitions in change_scene Added trace log level (for esc_compiler in particular) Fixed various bugs in ESC scripts Fix a bug where exit_scene happened multiple times where fast walking Needed to clear the event queue Fixes ready event was run because BYPASS_LAST_SCENE wrongly set Inverted parameter "disable_automatic_transitions" for change_scene, hide_menu, show_menu commands Fix broken sched_event Fixes as requested in PR
This commit is contained in:
@@ -40,9 +40,10 @@ func set_scene(p_scene: Node) -> void:
|
||||
if current_scene != null:
|
||||
clear_scene()
|
||||
|
||||
if not p_scene in get_children():
|
||||
if not p_scene.is_inside_tree() or not p_scene in get_children():
|
||||
add_child(p_scene)
|
||||
move_child(p_scene, 0)
|
||||
elif p_scene in get_children():
|
||||
move_child(p_scene, 0)
|
||||
current_scene = p_scene
|
||||
check_game_scene_methods()
|
||||
|
||||
@@ -62,7 +63,7 @@ func clear_scene() -> void:
|
||||
if escoria.game_scene.get_parent() == current_scene:
|
||||
current_scene.remove_child(escoria.game_scene)
|
||||
|
||||
remove_child(current_scene)
|
||||
current_scene.get_parent().remove_child(current_scene)
|
||||
current_scene.free()
|
||||
current_scene = null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user