Skip to content

Commit

Permalink
Hopefully fix ogre
Browse files Browse the repository at this point in the history
  • Loading branch information
davnotdev committed May 19, 2024
1 parent cae5e22 commit 7e4f508
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scripts/ogre.gd
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ func attack():
animated_sprite_2d.play("attack")
for _i in range(4):
await animated_sprite_2d.frame_changed
if can_attack_player():
player.take_damage(enemy_atk + 13)
player.bounce_towards((player.position - position).normalized() * 18.0)
else:
player.apply_shake()
attacking = false
if !is_dead:
if can_attack_player():
player.take_damage(enemy_atk + 13)
player.bounce_towards((player.position - position).normalized() * 18.0)
else:
player.apply_shake()
attacking = false

await animated_sprite_2d.animation_finished
if !is_dead:
Expand Down

0 comments on commit 7e4f508

Please sign in to comment.