Example #1
0
    public TerrainType(TerrainStaticData data)
    {
        gameplayData = data;

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

        prefab = loadPrefabByName( assetName );

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

        prefab = loadPrefabByName(assetName);

        TypeContainer <PropertyType> .add(gameplayData.name, this);
    }
Example #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);
    }
Example #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;
 }
Example #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 );
    }
Example #7
0
    public TerrainType(TerrainStaticData data)
    {
        gameplayData = data;

        this.prefabs = new TerrainPrefabs( gameplayData.name );
        TypeContainer<TerrainType>.add( this.gameplayData.name, this );
    }
Example #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;
 }