示例#1
0
        //Make the tiles
        public void StartNewGame(int gridDimension)
        {
            _gridDimension = gridDimension;

            _edgeOfMapdimesion = _gridDimension * MapTile.TileSideLength;

            _tiles = new MapTile[_gridDimension, _gridDimension];

            for (int y = 0; y < _gridDimension; y++)
            {
                for (int x = 0; x < _gridDimension; x++)
                {
                    _tiles[x, y] = new MapTile(MapTile.WorldPositionForGridCoordinates(x, y), DoorDirections.RandomDoors(), false);
                }
            }
            //initially set the overlays
            UpdateOverlays();
        }
示例#2
0
 public void enqueueShift(UIButton button)
 {
     if (_pressedButton != null)
     {
         Program.Objects.Map.queueShift(_pressedButton.Index, _pressedButton.Direction, DoorDirections.RandomDoors(), false);
         _pressedButton.reset();
         _pressedButton = null;
     }
 }