コード例 #1
0
 private static void OnRunTargetSelected(GameWindow window, IGameEngine engine, MageCrawlPoint point)
 {
     window.Map.InTargettingMode = false;
     RunningKeyboardHandler runner = new RunningKeyboardHandler(window, engine);
     runner.StartRunning(point);
 }
コード例 #2
0
ファイル: Map.xaml.cs プロジェクト: donblas/magecrawl
 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;
 }
コード例 #3
0
 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;
 }