Exemplo n.º 1
0
    public TerrainType(TerrainStaticData data)
    {
        gameplayData = data;

        this.prefabs = new TerrainPrefabs(gameplayData.name);
        TypeContainer <TerrainType> .add(this.gameplayData.name, this);
    }
Exemplo n.º 2
0
    public PropertyType(string assetName, TerrainStaticData data)
    {
        gameplayData = data;

        prefab = loadPrefabByName( assetName );

        TypeContainer<PropertyType>.add( gameplayData.name, this );
    }
Exemplo n.º 3
0
    public PropertyType(string assetName, TerrainStaticData data)
    {
        gameplayData = data;

        prefab = loadPrefabByName(assetName);

        TypeContainer <PropertyType> .add(gameplayData.name, this);
    }
Exemplo n.º 4
0
    public TerrainType(TerrainStaticData data, TerrainPrefabs prefabs)
    {
        gameplayData = data;

        if (prefabs == null)
        {
            this.prefabs = new TerrainPrefabs(gameplayData.name);
        }

        TypeContainer <TerrainType> .add(gameplayData.name, this);
    }
Exemplo n.º 5
0
 //Cleanup function for the Texture2D, since Mono's GC won't catch it when TerrainStaticData dies.
 //TODO: Does this even need to be called? The only time I can imagine it happening is when the app closes, and then the memory will be freed anyway.
 public static void Destroy(TerrainStaticData gameplayTerrainData)
 {
     Texture2D.Destroy(gameplayTerrainData.icon);
     gameplayTerrainData = null;
 }
Exemplo n.º 6
0
    public TerrainType(TerrainStaticData data, TerrainPrefabs prefabs)
    {
        gameplayData = data;

        if (prefabs == null)
            this.prefabs = new TerrainPrefabs( gameplayData.name );

        TypeContainer<TerrainType>.add( gameplayData.name, this );
    }
Exemplo n.º 7
0
    public TerrainType(TerrainStaticData data)
    {
        gameplayData = data;

        this.prefabs = new TerrainPrefabs( gameplayData.name );
        TypeContainer<TerrainType>.add( this.gameplayData.name, this );
    }
Exemplo n.º 8
0
 //Cleanup function for the Texture2D, since Mono's GC won't catch it when TerrainStaticData dies.
 //TODO: Does this even need to be called? The only time I can imagine it happening is when the app closes, and then the memory will be freed anyway.
 public static void Destroy(TerrainStaticData gameplayTerrainData)
 {
     Texture2D.Destroy( gameplayTerrainData.icon );
     gameplayTerrainData = null;
 }