Exemple #1
0
        private void addMineralRock(MiningPlatform r)
        {
            if (r.GetTeam() == WaveManager.ActiveTeam)
            {
                Vector2 UpperLeftCorner  = (r.getUpperLeftCorner() - Parent2DScene.MinBoundary.get()) / Divisor;
                Vector2 LowerRightCorner = (r.getLowerRightCorner() - Parent2DScene.MinBoundary.get()) / Divisor;

                int MinX = (int)UpperLeftCorner.X;
                int MinY = (int)UpperLeftCorner.Y;
                int MaxX = (int)LowerRightCorner.X;
                int MaxY = (int)LowerRightCorner.Y;

                for (int x = MinX; x < MaxX; x++)
                {
                    for (int y = MinY; y < MaxY; y++)
                    {
                        CellJobQue.Enqueue(x);
                        CellJobQue.Enqueue(y);
                        CellJobQue.Enqueue(StartingCell);
                    }
                }
            }
        }
Exemple #2
0
 public static void AddMineralRock(MiningPlatform r)
 {
     self.HotPoints.AddLast(new PathfindingHotPoint(r.Position.get(), r.GetTeam()));
     self.rebuild();
 }