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); }
public FoamTexture(string Name, FoamTextureType Type) { this.Name = Name; this.Type = Type; }
public void Read(BinaryReader Reader) { Name = Reader.ReadUTF8String(); Type = (FoamTextureType)Reader.ReadInt32(); }
static void AddTextureIfExists(bool Exists, ref FoamMaterial FoamMat, TextureSlot Texture, FoamTextureType TexType) { if (Exists) { FoamMat.AddTexture(new FoamTexture(Texture.FilePath, TexType)); } }