public static void Deserialize(ExpDefine ins, tabtoy.DataReader reader) { // 唯一ID if (reader.MatchTag(0x10000)) { ins.Level = reader.ReadInt32(); } // 经验值 if (reader.MatchTag(0x10001)) { ins.Exp = reader.ReadInt32(); } // 布尔检查 if (reader.MatchTag(0x70002)) { ins.BoolChecker = reader.ReadBool(); } // 类型 if (reader.MatchTag(0x80003)) { ins.Type = reader.ReadEnum <ActorType>(); } }
public static void Deserialize(ExpDefine ins, tabtoy.DataReader reader) { int tag = -1; while (-1 != (tag = reader.ReadTag())) { switch (tag) { case 0x10000: { ins.Level = reader.ReadInt32(); } break; case 0x10001: { ins.Exp = reader.ReadInt32(); } break; case 0x70002: { ins.BoolChecker = reader.ReadBool(); } break; case 0x80003: { ins.Type = reader.ReadEnum <ActorType>(); } break; } } }
public ExpDefine GetExpByLevel(int Level, ExpDefine def = default(ExpDefine)) { ExpDefine ret; if (_ExpByLevel.TryGetValue(Level, out ret)) { return(ret); } if (def == default(ExpDefine)) { TableLogger.ErrorLine("GetExpByLevel failed, Level: {0}", Level); } return(def); }