Beispiel #1
0
 public static void Deserialize(BasisAnimConfigDefine ins, System.IO.Stream stream)
 {
     tabtoy.DataReader reader = new tabtoy.DataReader(stream);
     if (!reader.ReadHeader())
     {
         throw new System.Exception(string.Format("Deserialize failed: {0}", ins.GetType()));
     }
     Deserialize(ins, reader);
 }
Beispiel #2
0
        public BasisAnimConfigDefine GetByID(int ID, BasisAnimConfigDefine def = default(BasisAnimConfigDefine))
        {
            BasisAnimConfigDefine ret;

            if (_ByID.TryGetValue(ID, out ret))
            {
                return(ret);
            }

            if (def == default(BasisAnimConfigDefine))
            {
                TableLogger.ErrorLine("GetByID failed, ID: {0}", ID);
            }

            return(def);
        }
Beispiel #3
0
        public static void Deserialize(BasisAnimConfigDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

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

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

                case 0x60002:
                {
                    ins.Ctrl = reader.ReadString();
                }
                break;

                case 0x60003:
                {
                    ins.Idle = reader.ReadString();
                }
                break;

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

                case 0x60005:
                {
                    ins.BattleBefore = reader.ReadString();
                }
                break;

                case 0x60006:
                {
                    ins.BattleIdle = reader.ReadString();
                }
                break;

                case 0x60007:
                {
                    ins.BattleAfter = reader.ReadString();
                }
                break;

                case 0x60008:
                {
                    ins.BattleRun = reader.ReadString();
                }
                break;

                case 0x60009:
                {
                    ins.SpecialIdle = reader.ReadString();
                }
                break;

                case 0x6000a:
                {
                    ins.SpecialRun = reader.ReadString();
                }
                break;

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

                case 0x6000c:
                {
                    ins.Repel = reader.ReadString();
                }
                break;

                case 0x6000d:
                {
                    ins.Roll = reader.ReadString();
                }
                break;

                case 0x6000e:
                {
                    ins.Dead = reader.ReadString();
                }
                break;
                }
            }
        }