Beispiel #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);
    }
Beispiel #2
0
        public void Undo()
        {
            IndoorTile tile = _map.GetTile(_tileID);

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

            tile.ChangeTileType(_newType);
        }