ft: extracted mirrorSprite to custom node

This commit is contained in:
djaidjai committed 2026-02-07 15:42:24 +01:00
1 parent 57c611a46d
commit 2211130fd3
8 files changed
+114 -114

No files matched your search

@@ -8,6 +8,7 @@ var desired_rotation: float = self.rotation
@onready var sprite = $AnimatedSprite2D
@onready var fsm: StateMachine = $StateMachine
@onready var attack_cooldown_timer: Timer = $AttackCooldownTimer
@onready var wrapper: WrappingManager = $WrappingManager
@export var damage: int = 15
@export var attack_range = 20
@@ -71,6 +72,7 @@ func die() -> void:
func become_injured() -> void:
sprite.play("Hurt")
wrapper.play_sprite("Hurt")
func _on_sight_body_entered(body: Node2D) -> void:
if fsm.map(fsm.state) != fsm.States.HUNTING and body.is_in_group("prey") or (health < maxHealth and body.is_in_group("player")):
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.