コード例 #1
0
        public static void Deserialize(FunctionOpenConfigDefine ins, tabtoy.DataReader reader)
        {
            int tag = -1;

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

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

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

                case 0x10003:
                {
                    ins.OpenLevel = reader.ReadInt32();
                }
                break;

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

                case 0x60005:
                {
                    ins.Icon.Add(reader.ReadString());
                }
                break;

                case 0x10006:
                {
                    ins.OpenBoot = reader.ReadInt32();
                }
                break;

                case 0x60007:
                {
                    ins.ModuleName = reader.ReadString();
                }
                break;
                }
            }
        }
コード例 #2
0
 public static void Deserialize(FunctionOpenConfigDefine 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);
 }
コード例 #3
0
        public FunctionOpenConfigDefine GetByID(string ID, FunctionOpenConfigDefine def = default(FunctionOpenConfigDefine))
        {
            FunctionOpenConfigDefine ret;

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

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

            return(def);
        }