Пример #1
0
        public static void Deserialize(ExpDefine ins, tabtoy.DataReader reader)
        {
            // 唯一ID
            if (reader.MatchTag(0x10000))
            {
                ins.Level = reader.ReadInt32();
            }

            // 经验值
            if (reader.MatchTag(0x10001))
            {
                ins.Exp = reader.ReadInt32();
            }

            // 布尔检查
            if (reader.MatchTag(0x70002))
            {
                ins.BoolChecker = reader.ReadBool();
            }

            // 类型
            if (reader.MatchTag(0x80003))
            {
                ins.Type = reader.ReadEnum <ActorType>();
            }
        }
Пример #2
0
        public static void Deserialize(ExpDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

            while (-1 != (tag = reader.ReadTag()))
            {
                switch (tag)
                {
                case 0x10000:
                {
                    ins.Level = reader.ReadInt32();
                }
                break;

                case 0x10001:
                {
                    ins.Exp = reader.ReadInt32();
                }
                break;

                case 0x70002:
                {
                    ins.BoolChecker = reader.ReadBool();
                }
                break;

                case 0x80003:
                {
                    ins.Type = reader.ReadEnum <ActorType>();
                }
                break;
                }
            }
        }
Пример #3
0
        public static void Deserialize(Pos ins, tabtoy.DataReader reader)
        {
            int tag = -1;

            while (-1 != (tag = reader.ReadTag()))
            {
                switch (tag)
                {
                case 0x80000:
                {
                    ins.Obj = reader.ReadEnum <Object>();
                }
                break;

                case 0x50001:
                {
                    ins.X = reader.ReadFloat();
                }
                break;

                case 0x50002:
                {
                    ins.Y = reader.ReadFloat();
                }
                break;
                }
            }
        }
Пример #4
0
        public static void Deserialize(Prop ins, tabtoy.DataReader reader)
        {
            int tag = -1;

            while (-1 != (tag = reader.ReadTag()))
            {
                switch (tag)
                {
                case 0x10000:
                {
                    ins.HP = reader.ReadInt32();
                }
                break;

                case 0x50001:
                {
                    ins.AttackRate = reader.ReadFloat();
                }
                break;

                case 0x80002:
                {
                    ins.ExType = reader.ReadEnum <ActorType>();
                }
                break;
                }
            }
        }
Пример #5
0
        public void Deserialize(tabtoy.DataReader reader)
        {
            // 唯一ID
            if (reader.MatchTag(0x20000))
            {
                this.ID = reader.ReadInt64( );
            }

            // 名称
            if (reader.MatchTag(0x60001))
            {
                this.Name = reader.ReadString( );
            }

            //
            if (reader.MatchTag(0x10002))
            {
                this.IconID = reader.ReadInt32( );
            }

            // 攻击率
            if (reader.MatchTag(0x50003))
            {
                this.NumericalRate = reader.ReadFloat( );
            }

            // 物品id
            if (reader.MatchTag(0x10004))
            {
                this.ItemID = reader.ReadInt32( );
            }

            // BuffID
            if (reader.MatchTag(0x10005))
            {
                reader.ReadList_Int32(this.BuffID);
            }

            // 类型
            if (reader.MatchTag(0x80006))
            {
                this.Type = reader.ReadEnum <ActorType>( );
            }

            // 技能ID列表
            if (reader.MatchTag(0x10007))
            {
                reader.ReadList_Int32(this.SkillID);
            }

            // 字符串结构
            if (reader.MatchTag(0x90008))
            {
                reader.ReadList_Struct <Prop>(this.StrStruct);
            }
        }
Пример #6
0
        public static void Deserialize(Prop ins, tabtoy.DataReader reader)
        {
            if (reader.MatchTag(0x10000))
            {
                ins.HP = reader.ReadInt32();
            }


            if (reader.MatchTag(0x50001))
            {
                ins.AttackRate = reader.ReadFloat();
            }


            if (reader.MatchTag(0x80002))
            {
                ins.ExType = reader.ReadEnum <ActorType>();
            }
        }
Пример #7
0
        public ActorType Type = ActorType.Fighter;         // 类型



        public void Deserialize(tabtoy.DataReader reader)
        {
            // 唯一ID
            if (reader.MatchTag(0x10000))
            {
                this.Level = reader.ReadInt32( );
            }

            // 经验值
            if (reader.MatchTag(0x10001))
            {
                this.Exp = reader.ReadInt32( );
            }

            // 类型
            if (reader.MatchTag(0x80002))
            {
                this.Type = reader.ReadEnum <ActorType>( );
            }
        }
Пример #8
0
        public void Deserialize(tabtoy.DataReader reader)
        {
            // 血量
            if (reader.MatchTag(0x10000))
            {
                this.HP = reader.ReadInt32( );
            }

            // 攻击速率
            if (reader.MatchTag(0x50001))
            {
                this.AttackRate = reader.ReadFloat( );
            }

            // 扩展类型
            if (reader.MatchTag(0x80002))
            {
                this.ExType = reader.ReadEnum <ActorType>( );
            }
        }
Пример #9
0
        public static void Deserialize(Prop ins, tabtoy.DataReader reader)
        {
            int tag = -1;

            while (-1 != (tag = reader.ReadTag()))
            {
                switch (tag)
                {
                case 0x80000:
                {
                    ins.Tag = reader.ReadEnum <PropTag>();
                }
                break;

                case 0x10001:
                {
                    ins.Value = reader.ReadInt32();
                }
                break;
                }
            }
        }
Пример #10
0
        public static void Deserialize(SampleDefine ins, tabtoy.DataReader reader)
        {
            // 唯一ID
            if (reader.MatchTag(0x20000))
            {
                ins.ID = reader.ReadInt64();
            }

            // 名称
            if (reader.MatchTag(0x60001))
            {
                ins.Name = reader.ReadString();
            }

            // 图标ID
            if (reader.MatchTag(0x10002))
            {
                ins.IconID = reader.ReadInt32();
            }

            // 攻击率
            if (reader.MatchTag(0x50003))
            {
                ins.NumericalRate = reader.ReadFloat();
            }

            // 物品id
            if (reader.MatchTag(0x10004))
            {
                ins.ItemID = reader.ReadInt32();
            }

            // BuffID
            if (reader.MatchTag(0x10005))
            {
                reader.ReadList_Int32(ins.BuffID);
            }


            if (reader.MatchTag(0x90006))
            {
                ins.Pos = reader.ReadStruct <Vec2>(Vec2DeserializeHandler);
            }

            // 类型
            if (reader.MatchTag(0x80007))
            {
                ins.Type = reader.ReadEnum <ActorType>();
            }

            // 技能ID列表
            if (reader.MatchTag(0x10008))
            {
                reader.ReadList_Int32(ins.SkillID);
            }

            // 单结构解析
            if (reader.MatchTag(0x90009))
            {
                ins.SingleStruct = reader.ReadStruct <Prop>(PropDeserializeHandler);
            }

            // 字符串结构
            if (reader.MatchTag(0x9000a))
            {
                reader.ReadList_Struct <Prop>(ins.StrStruct, PropDeserializeHandler);
            }
        }
Пример #11
0
        public static void Deserialize(SampleDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

            while (-1 != (tag = reader.ReadTag()))
            {
                switch (tag)
                {
                case 0x20000:
                {
                    ins.ID = reader.ReadInt64();
                }
                break;

                case 0x60001:
                {
                    ins.Name = reader.ReadString();
                }
                break;

                case 0x10002:
                {
                    ins.IconID = reader.ReadInt32();
                }
                break;

                case 0x50003:
                {
                    ins.NumericalRate = reader.ReadFloat();
                }
                break;

                case 0x10004:
                {
                    ins.ItemID = reader.ReadInt32();
                }
                break;

                case 0x10005:
                {
                    ins.BuffID.Add(reader.ReadInt32());
                }
                break;

                case 0x90006:
                {
                    ins.Pos = reader.ReadStruct <Vec2>(Vec2DeserializeHandler);
                }
                break;

                case 0x80007:
                {
                    ins.Type = reader.ReadEnum <ActorType>();
                }
                break;

                case 0x10008:
                {
                    ins.SkillID.Add(reader.ReadInt32());
                }
                break;

                case 0x90009:
                {
                    ins.AttackParam = reader.ReadStruct <AttackParam>(AttackParamDeserializeHandler);
                }
                break;

                case 0x9000a:
                {
                    ins.SingleStruct = reader.ReadStruct <Prop>(PropDeserializeHandler);
                }
                break;

                case 0x9000b:
                {
                    ins.StrStruct.Add(reader.ReadStruct <Prop>(PropDeserializeHandler));
                }
                break;
                }
            }
        }
Пример #12
0
        public static void Deserialize(TestDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

            while (-1 != (tag = reader.ReadTag()))
            {
                switch (tag)
                {
                case 0x10000:
                {
                    ins.ID = reader.ReadInt32();
                }
                break;

                case 0x10001:
                {
                    ins.TestInt = reader.ReadInt32();
                }
                break;

                case 0x20002:
                {
                    ins.TestLong = reader.ReadInt64();
                }
                break;

                case 0x50003:
                {
                    ins.TestFloat = reader.ReadFloat();
                }
                break;

                case 0x60004:
                {
                    ins.TestString = reader.ReadString();
                }
                break;

                case 0x10005:
                {
                    ins.TestIntArr.Add(reader.ReadInt32());
                }
                break;

                case 0x50006:
                {
                    ins.TestFloat2 = reader.ReadFloat();
                }
                break;

                case 0x60007:
                {
                    ins.TestStringArr.Add(reader.ReadString());
                }
                break;

                case 0x80008:
                {
                    ins.TestEnum0 = reader.ReadEnum <SkillTriggerType>();
                }
                break;

                case 0x80009:
                {
                    ins.TestEnum1 = reader.ReadEnum <SkillTriggerType>();
                }
                break;

                case 0x9000a:
                {
                    ins.TestClass = reader.ReadStruct <DropShow>(DropShowDeserializeHandler);
                }
                break;

                case 0x6000b:
                {
                    ins.Name = reader.ReadString();
                }
                break;
                }
            }
        }