challenge-editor/scene/card_state_machine/selected_back.gd

26 lines
513 B
GDScript3
Raw Normal View History

2024-09-24 17:26:44 +08:00
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()
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