예제 #1
0
    public void Awake()
    {
        instance = this;

        foreach (TileModel tileModelToSerialize in tilesToSerialize)
        {
            _tileTypes.Add(tileModelToSerialize.typeName.ToLower());
            _tiles.Add(tileModelToSerialize.typeName.ToLower(), tileModelToSerialize);
        }

        // the model that will represent a edgetile, this should not be exposed in the regular list becuase it is a constant tiletype that never should be edited and niether have to exist in editor
        TileModel edgeModel = new TileModel();

        edgeModel.MakeEdgeTile();
        _tileTypes.Add(edgeModel.typeName.ToLower());
        _tiles.Add(edgeModel.typeName.ToLower(), edgeModel);
    }