示例#1
0
 public void SetTexture([Localizable(false)] string textureName, string filename) {
     var bytes = File.ReadAllBytes(filename);
     Textures[textureName] = new Kn5Texture {
         Active = true,
         Name = textureName,
         Length = bytes.Length
     };
     TexturesData[textureName] = bytes;
 }
示例#2
0
        public void SetTexture([Localizable(false)] string textureName, string filename)
        {
            var bytes = File.ReadAllBytes(filename);

            Textures[textureName] = new Kn5Texture {
                Active = true,
                Name   = textureName,
                Length = bytes.Length
            };
            TexturesData[textureName] = bytes;
        }
示例#3
0
        private void ExportCollada_Texture(XmlWriter xml, Kn5Texture texture)
        {
            xml.WriteStartElement("image");
            xml.WriteAttributeStringSafe("id", $"{texture.Name}-image");
            xml.WriteAttributeStringSafe("name", texture.Name);

            xml.WriteStartElement("init_from");
            xml.WriteString("file://texture/" + texture.Name);
            xml.WriteEndElement();

            xml.WriteEndElement();
        }
示例#4
0
 public void Write(Kn5Texture texture)
 {
     Write(texture.Active ? 1 : 0);
     Write(texture.Name);
     Write(texture.Length);
 }
示例#5
0
 public void Write(Kn5Texture texture) {
     Write(texture.Active ? 1 : 0);
     Write(texture.Name);
     Write(texture.Length);
 }
示例#6
0
        private void ExportCollada_Texture(XmlWriter xml, Kn5Texture texture) {
            xml.WriteStartElement("image");
            xml.WriteAttributeStringSafe("id", $"{texture.Name}-image");
            xml.WriteAttributeStringSafe("name", texture.Name);
            
            xml.WriteStartElement("init_from");
            xml.WriteString("file://texture/" + texture.Name);
            xml.WriteEndElement();

            xml.WriteEndElement();
        }