fx: readded merged function

This commit is contained in:
djaidjai committed 2026-03-01 15:59:49 +01:00
1 parent 241dfb3073
commit a11805ad30
3 files changed
+11 -10

No files matched your search

@@ -16,6 +16,10 @@ func move(motion: Vector3, mod: float) -> void:
# Apply boundary to new position
position = GameManager.get_boundaried_position(position)
func handle_damage(dmg: int, src: Node) -> void:
if owner:
owner.handle_damage(dmg, src)
func duplicate_init() -> void:
var sight = $Sight
remove_child(sight)
@@ -15,7 +15,7 @@ var can_attack: bool = true
func _ready() -> void:
health = maxHealth
sprite.play("Healthy")
sprite.play("Healthy") # TODO: add play_sprite function which calls both sprite and wrapper
wrapper.play_sprite("Healthy")
if starting_pos:
collision.set_position(starting_pos)
@@ -42,9 +42,6 @@ func attack(target: Node) -> void:
if target.has_method("handle_damage"):
target.handle_damage(damage, self.collision)
hit_hittable = true
elif target.is_in_group("resources"):
# TODO: resource handling logic
pass
if hit_hittable:
attack_cooldown_timer.start()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.