Working on fixing enemy identification
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -16,14 +16,13 @@ class Dog extends Enemy {
|
||||
required super.angle,
|
||||
required super.mapId,
|
||||
}) : super(
|
||||
spriteIndex: 99,
|
||||
spriteIndex: EnemyType.dog.spriteBaseIdx,
|
||||
state: EntityState.idle,
|
||||
);
|
||||
|
||||
static Dog? trySpawn(int objId, double x, double y, Difficulty _) {
|
||||
// Dogs span 216 to 251.
|
||||
if (objId >= MapObject.dogStart && objId <= MapObject.dogStart + 35) {
|
||||
bool isPatrolling = objId >= MapObject.dogStart + 18;
|
||||
if (EnemyType.dog.claimsMapId(objId)) {
|
||||
bool isPatrolling = objId >= EnemyType.dog.mapBaseId + 18;
|
||||
|
||||
return Dog(
|
||||
x: x,
|
||||
|
||||
Reference in New Issue
Block a user