public void AddUnitString(string key, Func <BaseUnit, string> data) { if (UnitString.ContainsKey(key)) { return; } UnitString.Add(key, data); }
public string GetUnitString(string key, BaseUnit unit) { if (unit == null) { CLog.Error("BaseRefMgr:GetUnitFloat:Unit为Null"); return(Const.STR_Inv); } if (!UnitString.ContainsKey(key)) { CLog.Error("BaseRefMgr:GetUnitString:没有RefKey:{0}", key); return(Const.STR_Inv); } return(UnitString[key].Invoke(unit)); }