otherworldly_simulation/scene/test/atk.gd

22 lines
360 B
GDScript3
Raw Permalink Normal View History

2024-10-25 17:45:08 +08:00
extends State
var target
func enter_state(n):
if n is Unit:
target=n
2024-11-01 23:23:07 +08:00
get_player().set_target(n.global_position)
2024-10-25 17:45:08 +08:00
get_player().attack()
pass
func update_state(delta):
pass
func update_state_phy(delta):
if get_player().is_attack_finished():
change_to_state("idle")
func exit_state():
target=null
pass
func process_message(type:String,n):
pass