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