Esempio n. 1
0
    private bool TryGetTile(GameObject go, out IndoorTile tile)
    {
        if (go.transform.parent == null)
        {
            tile = null;
            return(false);
        }

        GameObject parent = go.transform.parent.gameObject;

        if (parent == null)
        {
            tile = null;
            return(false);
        }

        tile = parent.GetComponent <IndoorTile>();
        if (tile == null)
        {
            return(false);
        }

        return(true);
    }
Esempio n. 2
0
        public void Undo()
        {
            IndoorTile tile = _map.GetTile(_tileID);

            tile.ChangeTileType(_oldType);
        }
Esempio n. 3
0
        public void Execute()
        {
            IndoorTile tile = _map.GetTile(_tileID);

            tile.ChangeTileType(_newType);
        }