public static void Deserialize(FixedRuleListDefine ins, tabtoy.DataReader reader) { int tag = -1; while (-1 != (tag = reader.ReadTag())) { switch (tag) { case 0x60000: { ins.ID = reader.ReadString(); } break; case 0x10001: { ins.ParamType = reader.ReadInt32(); } break; case 0x50002: { ins.Value = reader.ReadFloat(); } break; } } }
public static void Deserialize(FixedRuleListDefine 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); }
public FixedRuleListDefine GetByID(string ID, FixedRuleListDefine def = default(FixedRuleListDefine)) { FixedRuleListDefine ret; if (_ByID.TryGetValue(ID, out ret)) { return(ret); } if (def == default(FixedRuleListDefine)) { TableLogger.ErrorLine("GetByID failed, ID: {0}", ID); } return(def); }