challenge-editor/scene/card_state_machine/selected_back.gd
2024-09-24 17:26:44 +08:00

29 lines
598 B
GDScript

extends State
func enter_state(n):
get_player().down()
var player:Card=get_player() as Card
var target_position=player.get_self_index_position()
player.move_to(player.position,target_position)
pass
func update_state(delta):
get_player().position=get_player().get_parent().get_local_mouse_position()
if Input.is_action_just_released("mouse_left"):
change_to_state("focus")
return
pass
func update_state_phy(delta):
pass
func exit_state():
pass
func time_out():
pass
func process_message(type:String,n):
match type:
"move_finished":
change_to_state("idle")
return
pass