Beispiel #1
0
        public static void Deserialize(LevelConfigDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

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

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

                case 0x10002:
                {
                    ins.MapId = reader.ReadInt32();
                }
                break;
                }
            }
        }
Beispiel #2
0
        public LevelConfigDefine GetLevelConfigByID(int ID, LevelConfigDefine def = default(LevelConfigDefine))
        {
            LevelConfigDefine ret;

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

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

            return(def);
        }