fix: allows for transition to be disabled on init; still has issue w/ UI showing up for fraction of a second
This commit is contained in:
committed by
Julian Murgia
parent
4c39e47d38
commit
6afff99e7c
@@ -84,8 +84,6 @@ func do(action: int, params: Array = [], can_interrupt: bool = false) -> void:
|
|||||||
if can_interrupt:
|
if can_interrupt:
|
||||||
escoria.event_manager.interrupt_running_event()
|
escoria.event_manager.interrupt_running_event()
|
||||||
|
|
||||||
self.clear_current_action()
|
|
||||||
|
|
||||||
var walk_fast = false
|
var walk_fast = false
|
||||||
if params.size() > 2:
|
if params.size() > 2:
|
||||||
walk_fast = true if params[2] else false
|
walk_fast = true if params[2] else false
|
||||||
|
|||||||
@@ -113,6 +113,7 @@ func change_scene(room_path: String, enable_automatic_transitions: bool) -> void
|
|||||||
var game_parent = escoria.game_scene.get_parent()
|
var game_parent = escoria.game_scene.get_parent()
|
||||||
game_parent.remove_child(escoria.game_scene)
|
game_parent.remove_child(escoria.game_scene)
|
||||||
|
|
||||||
|
#escoria.game_scene.hide_ui()
|
||||||
room_scene.add_child(escoria.game_scene)
|
room_scene.add_child(escoria.game_scene)
|
||||||
room_scene.move_child(escoria.game_scene, 0)
|
room_scene.move_child(escoria.game_scene, 0)
|
||||||
room_scene.game = escoria.game_scene
|
room_scene.game = escoria.game_scene
|
||||||
|
|||||||
@@ -39,12 +39,9 @@ func _ready() -> void:
|
|||||||
anchor_right = 1
|
anchor_right = 1
|
||||||
anchor_bottom = 1
|
anchor_bottom = 1
|
||||||
color = Color.white
|
color = Color.white
|
||||||
|
color.a = 0
|
||||||
mouse_filter = MOUSE_FILTER_IGNORE
|
mouse_filter = MOUSE_FILTER_IGNORE
|
||||||
_tween = Tween.new()
|
_tween = Tween.new()
|
||||||
add_child(_tween)
|
|
||||||
_tween.connect("tween_all_completed", self, "_on_tween_completed")
|
|
||||||
|
|
||||||
transition()
|
|
||||||
|
|
||||||
|
|
||||||
# Play a transition animation
|
# Play a transition animation
|
||||||
@@ -61,6 +58,14 @@ func transition(
|
|||||||
duration: float = 1.0
|
duration: float = 1.0
|
||||||
) -> int:
|
) -> int:
|
||||||
|
|
||||||
|
# We put this here instead of the constructor since if we have it in the
|
||||||
|
# constructor, the transition will ALWAYS happen on game start, which might
|
||||||
|
# not be desired if 'false' is used for automatic_transitions in a
|
||||||
|
# change_scene call in :init.
|
||||||
|
if not _tween.is_inside_tree():
|
||||||
|
add_child(_tween)
|
||||||
|
_tween.connect("tween_all_completed", self, "_on_tween_completed")
|
||||||
|
|
||||||
if transition_name.empty():
|
if transition_name.empty():
|
||||||
transition_name = escoria.project_settings_manager.get_setting(
|
transition_name = escoria.project_settings_manager.get_setting(
|
||||||
escoria.project_settings_manager.DEFAULT_TRANSITION
|
escoria.project_settings_manager.DEFAULT_TRANSITION
|
||||||
|
|||||||
@@ -347,6 +347,7 @@ func _on_action_finished() -> void:
|
|||||||
tooltip.clear()
|
tooltip.clear()
|
||||||
|
|
||||||
func _on_event_done(_return_code: int, _event_name: String):
|
func _on_event_done(_return_code: int, _event_name: String):
|
||||||
|
if _return_code == ESCExecution.RC_OK:
|
||||||
escoria.action_manager.clear_current_action()
|
escoria.action_manager.clear_current_action()
|
||||||
verbs_menu.unselect_actions()
|
verbs_menu.unselect_actions()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user