Fix some enemy stuff

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-14 01:18:52 +01:00
parent 1bd0814e8c
commit 6bf479dcf7
5 changed files with 106 additions and 98 deletions

View File

@@ -16,6 +16,7 @@ abstract class Enemy extends Entity {
// Standard guard health
int health = 25;
int damage = 10;
bool isDying = false;
void takeDamage(int amount, int currentTime) {
@@ -106,7 +107,7 @@ abstract class Enemy extends Entity {
return true;
}
void update({
({Coordinate2D movement, double newAngle}) update({
required int elapsedMs,
required Coordinate2D playerPosition,
required bool Function(int x, int y) isWalkable,