Gotta fix the hurt for player but otherwise done.
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
class_name Enemy extends QuestSprite
|
||||
|
||||
|
||||
|
||||
func attack(target : QuestSprite) -> void:
|
||||
print("Attack by %s to %s" % [name, target.name])
|
||||
hitting.connect(hit.bind(target), CONNECT_ONE_SHOT)
|
||||
anim_player.play("attack")
|
||||
|
||||
func set_animation(anim_name : String) -> void:
|
||||
anim_player.play(anim_name)
|
||||
|
||||
func hit(target : QuestSprite) -> void:
|
||||
target.take_damage(self, 2)
|
||||
|
||||
Reference in New Issue
Block a user