コード例 #1
0
        public void SetFromTreeNodes(TreeNode Root)
        {
            GfxGlassBreakType = new GfxGlassBreakTypeItem[Root.Nodes.Count];

            for (int i = 0; i < GfxGlassBreakType.Length; i++)
            {
                TreeNode ChildNode          = Root.Nodes[i];
                GfxGlassBreakTypeItem Entry = (GfxGlassBreakTypeItem)ChildNode.Tag;
                GfxGlassBreakType[i] = Entry;
            }
        }
コード例 #2
0
        public void ReadFromFile(BinaryReader reader)
        {
            uint count1 = reader.ReadUInt32();
            uint count2 = reader.ReadUInt32();

            GfxGlassBreakType = new GfxGlassBreakTypeItem[count1];

            for (int i = 0; i < GfxGlassBreakType.Length; i++)
            {
                GfxGlassBreakTypeItem Item = new GfxGlassBreakTypeItem();
                Item.ID                       = reader.ReadUInt32();
                Item.TypeName                 = StringHelpers.ReadStringBuffer(reader, 32);
                Item.MixedTex                 = StringHelpers.ReadStringBuffer(reader, 32);
                Item.SpiderTex                = StringHelpers.ReadStringBuffer(reader, 32);
                Item.MatGuid_Part0            = reader.ReadUInt32();
                Item.MatGuid_Part1            = reader.ReadUInt32();
                Item.Defence                  = reader.ReadInt32();
                Item.OptimalScale             = reader.ReadInt32();
                Item.WorstScale               = reader.ReadInt32();
                Item.DynamicBreakPower        = reader.ReadInt32();
                Item.DynamicCrackPower        = reader.ReadInt32();
                Item.FragmentDisappearLimit   = reader.ReadInt32();
                Item.SpiderRnd                = reader.ReadInt32();
                Item.SpidersLimitMin          = reader.ReadInt32();
                Item.SpidersLimitMax          = reader.ReadInt32();
                Item.SpiderSize               = reader.ReadSingle();
                Item.FragmentConnectionLimit  = reader.ReadInt32();
                Item.CracksLimitMin           = reader.ReadInt32();
                Item.CracksLimitMax           = reader.ReadInt32();
                Item.CracksLimitPerHit        = reader.ReadInt32();
                Item.CracksDamagePerPiece     = reader.ReadInt32();
                Item.CrackCreateRnd           = reader.ReadInt32();
                Item.SndSpider                = reader.ReadInt32();
                Item.SndSpiderCategory        = reader.ReadInt32();
                Item.SndDestruct              = reader.ReadInt32();
                Item.SndDestructCategory      = reader.ReadInt32();
                Item.SndLargeDestruct         = reader.ReadInt32();
                Item.SndLargeDestructCategory = reader.ReadInt32();
                Item.PtcSpider                = reader.ReadInt32();
                Item.PtcFragment              = reader.ReadInt32();
                Item.PtcMultiGlass            = reader.ReadInt32();
                Item.CanDropShards            = reader.ReadBoolean();
                Item.GenHumanHole             = reader.ReadBoolean();
                Item.Unknown1                 = reader.ReadBoolean();
                Item.Unknown2                 = reader.ReadBoolean();
                Item.ManHoleHeight            = reader.ReadSingle();
                Item.ManHoleWidth             = reader.ReadSingle();
                Item.DmgForDestruction        = reader.ReadSingle();
                GfxGlassBreakType[i]          = Item;
            }
        }
コード例 #3
0
        public void WriteToFile(XBinWriter writer)
        {
            writer.Write(GfxGlassBreakType.Length);
            writer.Write(GfxGlassBreakType.Length);

            for (int i = 0; i < GfxGlassBreakType.Length; i++)
            {
                GfxGlassBreakTypeItem Item = GfxGlassBreakType[i];
                writer.Write(Item.ID);
                StringHelpers.WriteStringBuffer(writer, 32, Item.TypeName);
                StringHelpers.WriteStringBuffer(writer, 32, Item.MixedTex);
                StringHelpers.WriteStringBuffer(writer, 32, Item.SpiderTex);
                writer.Write(Item.MatGuid_Part0);
                writer.Write(Item.MatGuid_Part1);
                writer.Write(Item.Defence);
                writer.Write(Item.OptimalScale);
                writer.Write(Item.WorstScale);
                writer.Write(Item.DynamicBreakPower);
                writer.Write(Item.DynamicCrackPower);
                writer.Write(Item.FragmentDisappearLimit);
                writer.Write(Item.SpiderRnd);
                writer.Write(Item.SpidersLimitMin);
                writer.Write(Item.SpidersLimitMax);
                writer.Write(Item.SpiderSize);
                writer.Write(Item.FragmentConnectionLimit);
                writer.Write(Item.CracksLimitMin);
                writer.Write(Item.CracksLimitMax);
                writer.Write(Item.CracksLimitPerHit);
                writer.Write(Item.CracksDamagePerPiece);
                writer.Write(Item.CrackCreateRnd);
                writer.Write(Item.SndSpider);
                writer.Write(Item.SndSpiderCategory);
                writer.Write(Item.SndDestruct);
                writer.Write(Item.SndDestructCategory);
                writer.Write(Item.SndLargeDestruct);
                writer.Write(Item.SndLargeDestructCategory);
                writer.Write(Item.PtcSpider);
                writer.Write(Item.PtcFragment);
                writer.Write(Item.PtcMultiGlass);
                writer.Write(Item.CanDropShards);
                writer.Write(Item.GenHumanHole);
                writer.Write(Item.Unknown1);
                writer.Write(Item.Unknown2);
                writer.Write(Item.ManHoleHeight);
                writer.Write(Item.ManHoleWidth);
                writer.Write(Item.DmgForDestruction);
            }
        }