예제 #1
0
        private bool LoadTexture(StructureTexture.TextureName textureName)
        {
            switch (textureName)
            {
            case StructureTexture.TextureName.UpwardRoadDiffuse:
                return(UpwardRoadDiffuse.Load());

            case StructureTexture.TextureName.DownwardRoadDiffuse:
                return(DownwardRoadDiffuse.Load());

            case StructureTexture.TextureName.BuildingFloorDiffuse:
                return(BuildingFloorDiffuse.Load());

            case StructureTexture.TextureName.BuildingBaseDiffuse:
                return(BuildingBaseDiffuse.Load());

            case StructureTexture.TextureName.BuildingBaseNormal:
                return(BuildingBaseNormal.Load());

            case StructureTexture.TextureName.BuildingBurntDiffuse:
                return(BuildingBurntDiffuse.Load());

            case StructureTexture.TextureName.BuildingAbandonedDiffuse:
                return(BuildingAbandonedDiffuse.Load());

            case StructureTexture.TextureName.LightColorPalette:
                return(LightColorPalette.Load());

            default: return(false);
            }
        }
예제 #2
0
        private void SetTexture(string themeID, StructureTexture.TextureName textureName)
        {
            switch (textureName)
            {
            case StructureTexture.TextureName.UpwardRoadDiffuse:
                UpwardRoadDiffuse = new StructureTexture(textureName, themeID);
                break;

            case StructureTexture.TextureName.DownwardRoadDiffuse:
                DownwardRoadDiffuse = new StructureTexture(textureName, themeID);
                break;

            case StructureTexture.TextureName.BuildingFloorDiffuse:
                BuildingFloorDiffuse = new StructureTexture(textureName, themeID);
                break;

            case StructureTexture.TextureName.BuildingBaseDiffuse:
                BuildingBaseDiffuse = new StructureTexture(textureName, themeID);
                break;

            case StructureTexture.TextureName.BuildingBaseNormal:
                BuildingBaseNormal = new StructureTexture(textureName, themeID);
                break;

            case StructureTexture.TextureName.BuildingBurntDiffuse:
                BuildingBurntDiffuse = new StructureTexture(textureName, themeID);
                break;

            case StructureTexture.TextureName.BuildingAbandonedDiffuse:
                BuildingAbandonedDiffuse = new StructureTexture(textureName, themeID);
                break;

            case StructureTexture.TextureName.LightColorPalette:
                LightColorPalette = new StructureTexture(textureName, themeID);
                break;
            }
        }