Rogue: Savage Rats, a retro-themed dungeon crawler
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
rogue-savage-rats/src/mightypork/rogue/world/entity/entities/SimpleMonster.java

41 lines
706 B

package mightypork.rogue.world.entity.entities;
import mightypork.gamecore.util.math.algo.pathfinding.PathFindingContext;
import mightypork.rogue.world.entity.*;
public abstract class SimpleMonster extends Entity {
/** Navigation PFC */
private EntityPathfindingContext pathfc;
private final EntityModule ai = new MonsterAi(this);
public SimpleMonster(EntityModel model, int eid)
{
super(model, eid);
addModule("ai", ai);
}
@Override
public PathFindingContext getPathfindingContext()
{
if (pathfc == null) {
pathfc = new SimpleEntityPathFindingContext(this);
}
return pathfc;
}
@Override
public EntityType getType()
{
return EntityType.MONSTER;
}
}