mirror of
https://github.com/Relintai/pandemonium_demo_projects.git
synced 2024-12-21 13:56:50 +01:00
18 lines
295 B
GDScript
18 lines
295 B
GDScript
extends Combatant
|
|
|
|
func set_active(value):
|
|
.set_active(value)
|
|
if not active:
|
|
return
|
|
|
|
if not $Timer.is_inside_tree():
|
|
return
|
|
$Timer.start()
|
|
yield($Timer, "timeout")
|
|
var target
|
|
for actor in get_parent().get_children():
|
|
if not actor == self:
|
|
target = actor
|
|
break
|
|
attack(target)
|