Improving card reveal handling
This commit is contained in:
parent
6824a75e29
commit
f314c1c1ca
|
|
@ -88,7 +88,8 @@ func _ready():
|
|||
|
||||
func _hide_buttons():
|
||||
if is_inside_tree():
|
||||
if not State.reduce_motion: $AnimationPlayer.play_backwards("show_buttons")
|
||||
if not State.reduce_motion:
|
||||
$AnimationPlayer.play_backwards("show_buttons")
|
||||
|
||||
func _show_buttons():
|
||||
if is_inside_tree():
|
||||
|
|
@ -103,7 +104,7 @@ func hide():
|
|||
if visible:
|
||||
_hide_buttons()
|
||||
var tween = create_tween()
|
||||
tween.tween_property(self, "modulate", 0, 0.4)
|
||||
tween.tween_property(self, "modulate", Color(0, 0, 0), 0.4)
|
||||
_hide_buttons()
|
||||
await tween.finished
|
||||
visible = false
|
||||
|
|
|
|||
|
|
@ -67,12 +67,15 @@ func _ready():
|
|||
|
||||
func _on_ini_room():
|
||||
State.take_stage(self)
|
||||
get_tree().call_group("animation_player", "play_scene", Scenes.id.YOUTH_DRAEVEN, false)
|
||||
State.queue_for_stage(self)
|
||||
|
||||
func _process(_delta):
|
||||
|
||||
if focus_ray.get_collider() != null:
|
||||
emit_signal("ui_entered")
|
||||
has_entered = true
|
||||
focus_ray.get_collider().reveal()
|
||||
|
||||
if has_entered and has_stage:
|
||||
if focus_ray.get_collider() == null:
|
||||
|
|
|
|||
Loading…
Reference in New Issue