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); } }
protected List<Point> GetPathToPlayer(IGameEngineCore engine, Monster monster) { return engine.PathToPoint(monster, engine.Player.Position, monster.Intelligent, false, true); }