示例#1
0
        public static void Deserialize(MapConfigDefine 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 0x60002:
                {
                    ins.AssetPath = reader.ReadString();
                }
                break;
                }
            }
        }
示例#2
0
        public MapConfigDefine GetMapConfigByID(int ID, MapConfigDefine def = default(MapConfigDefine))
        {
            MapConfigDefine ret;

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

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

            return(def);
        }