private static void OnRunTargetSelected(GameWindow window, IGameEngine engine, MageCrawlPoint point) { window.Map.InTargettingMode = false; RunningKeyboardHandler runner = new RunningKeyboardHandler(window, engine); runner.StartRunning(point); }
private bool IsPointDrawable(MageCrawlPoint p) { MageCrawlPoint upperLeft = UpperLeftViewPoint; return p.X >= upperLeft.X && p.Y >= upperLeft.Y && p.X < upperLeft.X + MapWidth && p.Y < upperLeft.Y + MapHeight; }
private List<EffectivePoint> GetConeTargetablePoints(MageCrawlPoint playerPosition) { List<EffectivePoint> targetablePoints = new List<EffectivePoint>(); targetablePoints.Add(new EffectivePoint(playerPosition + new MageCrawlPoint(0, 1), 1.0f)); targetablePoints.Add(new EffectivePoint(playerPosition + new MageCrawlPoint(0, -1), 1.0f)); targetablePoints.Add(new EffectivePoint(playerPosition + new MageCrawlPoint(1, 0), 1.0f)); targetablePoints.Add(new EffectivePoint(playerPosition + new MageCrawlPoint(-1, 0), 1.0f)); m_engine.Targetting.FilterNotTargetableToPlayerPointsFromList(targetablePoints, true); return targetablePoints; }