예제 #1
0
        protected bool WalkTowardsLastKnownPosition(IGameEngineCore engine, Monster monster)
        {
            if (monster.PlayerLastKnownPosition == Point.Invalid)
                return false;

            List<Point> pathTowards = engine.PathToPoint(monster, monster.PlayerLastKnownPosition, monster.Intelligent, false, true);
            if (pathTowards == null || pathTowards.Count == 0)
            {
                monster.PlayerLastKnownPosition = Point.Invalid;
                return false;
            }
            else
            {
                return MoveOnPath(engine, pathTowards, monster);
            }
        }
예제 #2
0
 protected List<Point> GetPathToPlayer(IGameEngineCore engine, Monster monster)
 {
     return engine.PathToPoint(monster, engine.Player.Position, monster.Intelligent, false, true);
 }