Adding more enemy types
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -38,23 +38,6 @@ abstract class Enemy extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
static double getInitialAngle(int objId) {
|
||||
int normalizedId = (objId - 108) % 36;
|
||||
int direction = normalizedId % 4;
|
||||
switch (direction) {
|
||||
case 0:
|
||||
return 0.0;
|
||||
case 1:
|
||||
return 3 * math.pi / 2;
|
||||
case 2:
|
||||
return math.pi;
|
||||
case 3:
|
||||
return math.pi / 2;
|
||||
default:
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
void checkWakeUp({
|
||||
required int elapsedMs,
|
||||
required Coordinate2D playerPosition,
|
||||
@@ -187,7 +170,7 @@ abstract class Enemy extends Entity {
|
||||
required int elapsedMs,
|
||||
required Coordinate2D playerPosition,
|
||||
required bool Function(int x, int y) isWalkable,
|
||||
required void Function(int x, int y) tryOpenDoor, // NEW
|
||||
required void Function(int x, int y) tryOpenDoor,
|
||||
required void Function(int damage) onDamagePlayer,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user