Ejemplo n.º 1
0
        public void save()
        {
            _canWalk     = new bool[tiles.GetLength(1) * tiles.GetLength(0)];
            _light       = new byte[tiles.GetLength(1) * tiles.GetLength(0)];
            _explored    = new bool[tiles.GetLength(1) * tiles.GetLength(0)];
            _tileID      = new string[tiles.GetLength(1) * tiles.GetLength(0)];
            _transparent = new bool[tiles.GetLength(1) * tiles.GetLength(0)];

            for (int y = 0; y < tiles.GetLength(1); y++)
            {
                for (int x = 0; x < tiles.GetLength(0); x++)
                {
                    tiles[x, y].canWalk     = map.isWalkable(x, y);
                    tiles[x, y].transparent = map.isTransparent(x, y);

                    _canWalk[tileIndex(x, y)]     = tiles[x, y].canWalk;
                    _explored[tileIndex(x, y)]    = tiles[x, y].explored;
                    _tileID[tileIndex(x, y)]      = tiles[x, y].tileID;
                    _transparent[tileIndex(x, y)] = tiles[x, y].transparent;
                }
            }
        }
Ejemplo n.º 2
0
 public bool getPassable(int x, int y)
 {
     return(tcodMap.isWalkable(x, y));
 }
Ejemplo n.º 3
0
 public bool IsWalkable(int x, int y)
 {
     return(_currentMap.isWalkable(x, y));
 }
Ejemplo n.º 4
0
 public bool IsWalkable(int x, int y)
 {
     return(TCODMap.isWalkable(x, y));
 }
Ejemplo n.º 5
0
 public Cell GetCell(int x, int y)
 {
     return(new Cell(x, y, TCODMap.isTransparent(x, y), TCODMap.isWalkable(x, y), TCODMap.isInFov(x, y)));
 }
Ejemplo n.º 6
0
 public void SetVisible(int x, int y, bool visible)
 {
     _fovMap.setProperties(x, y, visible, _fovMap.isWalkable(x, y));
     MapPartiallyUpdated(x, y, _fovMap.isWalkable(x, y), visible);
 }
Ejemplo n.º 7
0
 public bool this[int x, int y]
 {
     get { return(!TCODMap.isWalkable(x, y)); }
     set { TCODMap.setProperties(x, y, !value, !value); }
 }