Update Enemy.gd

This commit is contained in:
MarcEricMartel 2023-10-10 16:32:28 -04:00
parent febe1b5577
commit bef6ae8f4e

View File

@ -41,6 +41,8 @@ func _process(delta):
# AI STUFF # AI STUFF
#velocity = processAI(objects,velocity,delta) #velocity = processAI(objects,velocity,delta)
if !hitanim.is_emitting():
anim.modulate(Color(0,0,0,1))
move_and_slide() move_and_slide()
@ -88,6 +90,7 @@ func receive_damage(dmg):
pass pass
hp -= dmg hp -= dmg
hitanim.restart() hitanim.restart()
anim.modulate(Color(0,0,0,.5))
if hp < 0: if hp < 0:
velocity = Vector2(0,0) velocity = Vector2(0,0)
setAnimState("Die") setAnimState("Die")