Beispiel #1
0
        public bool FindTexture(FoamTextureType Type, out FoamTexture Tex)
        {
            for (int i = 0; i < Textures.Length; i++)
            {
                if (Textures[i].Type == Type)
                {
                    Tex = Textures[i];
                    return(true);
                }
            }

            Tex = new FoamTexture();
            return(false);
        }
Beispiel #2
0
 public FoamTexture(string Name, FoamTextureType Type)
 {
     this.Name = Name;
     this.Type = Type;
 }
Beispiel #3
0
 public void Read(BinaryReader Reader)
 {
     Name = Reader.ReadUTF8String();
     Type = (FoamTextureType)Reader.ReadInt32();
 }
Beispiel #4
0
 static void AddTextureIfExists(bool Exists, ref FoamMaterial FoamMat, TextureSlot Texture, FoamTextureType TexType)
 {
     if (Exists)
     {
         FoamMat.AddTexture(new FoamTexture(Texture.FilePath, TexType));
     }
 }