コード例 #1
0
        public void Load(string fileName)
        {
            var resource = new ResourceFile_GTA5_pc <ParticleEffectsList>();

            resource.Load(fileName);

            particles = resource.ResourceData;
        }
コード例 #2
0
        public void Load(Stream stream)
        {
            var resource = new ResourceFile_GTA5_pc <ParticleEffectsList>();

            resource.Load(stream);

            if (resource.Version != 68)
            {
                throw new Exception("version error");
            }

            particles = resource.ResourceData;
        }
コード例 #3
0
        public static string GetXml(YptFile ypt, string outputFolder = "")
        {
            StringBuilder sb = new StringBuilder();

            sb.AppendLine(XmlHeader);

            if (ypt?.PtfxList != null)
            {
                ParticleEffectsList.WriteXmlNode(ypt.PtfxList, sb, 0, outputFolder);
            }

            return(sb.ToString());
        }
コード例 #4
0
        public static YptFile GetYpt(XmlDocument doc, string inputFolder = "")
        {
            YptFile r = new YptFile();

            var ddsfolder = inputFolder;

            var node = doc.DocumentElement;

            if (node != null)
            {
                r.PtfxList = ParticleEffectsList.ReadXmlNode(node, ddsfolder);
            }

            r.Name = Path.GetFileName(inputFolder);

            return(r);
        }
コード例 #5
0
 public ParticlesWrapper_GTA5_pc(ParticleEffectsList particles)
 {
     this.particles = particles;
 }