Update Enemy.gd
This commit is contained in:
parent
febe1b5577
commit
bef6ae8f4e
@ -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")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user