challenge-editor/scene/card_state_machine/getting.gd

30 lines
618 B
GDScript3
Raw Normal View History

2024-09-24 11:59:54 +08:00
extends State
2024-09-24 17:26:44 +08:00
func enter_state(n):
var player:Card=get_player() as Card
var target_position=player.get_self_index_position()
player.move_to(player.position,target_position)
func update_state(delta):
pass
func update_state_phy(delta):
pass
func exit_state():
pass
2024-09-24 11:59:54 +08:00
2024-09-24 17:26:44 +08:00
func time_out():
pass
func process_message(type:String,n):
match type:
"move_finished":
change_to_state("idle")
"resize":
var player:Card=get_player() as Card
var target_position=player.get_self_index_position()
player.move_to(player.position,target_position)
pass
2024-09-25 18:04:02 +08:00
"clear":
change_to_state("discard")
return
2024-09-24 11:59:54 +08:00
pass