public override string GetDesc() { string retStr = ""; if (CostDatas == null) { return(retStr); } foreach (var item in CostDatas) { if (item.RealVal == 0) { continue; } if (!item.IsCondition) { continue; } bool tempBool = true; if (BaseMathUtils.Round(GetAttrVal(item.Type), 2) < item.RealVal) { tempBool = false; } string tempstr = BaseLanguageMgr.Get("AC_IsAttrToAct", (item.Type as Enum).GetName(), ACCompareType.MoreEqual.GetName(), item.ToString(false, false, false)); if (tempBool) { retStr += BaseConstMgr.STR_Indent + "<Color=green>" + tempstr + "</Color>"; } else { retStr += BaseConstMgr.STR_Indent + "<Color=red>" + tempstr + "</Color>"; } } return(retStr); }
/// <summary> /// 获得消耗字符窜 /// </summary> /// <returns></returns> public string GetCacheCost() { if (IgnoreCondition) { return(""); } string mustCondition = ""; //必须条件 string cost = ""; if (andCacheConditions != null) { for (int i = 0; i < andCacheConditions.Count; ++i) { if (andCacheConditions[i].IsCost) { cost += andCacheConditions[i].GetCost() + BaseConstMgr.STR_Append; } } //andCacheConditions = null; } if (cost != "") { mustCondition = "<color=yellow>" + BaseLanguageMgr.Get("AC_消耗", cost) + "</color>"; } return(mustCondition); }
public static string GetDescV <T>(this List <AttrChange <T> > data) where T : Enum { string retStr = ""; string costStr = ""; int index = 0; foreach (var item in data) { if (item.RealVal == 0) { continue; } string temp = item.GetDesc(false, false); temp = Const.STR_Indent + temp; if (index < data.Count - 1) { temp = temp + "\n"; } index++; costStr += temp; } if (costStr != "") { retStr = BaseLanguageMgr.Get("AC_属性", UIUtil.Yellow(costStr)); } return(retStr); }
public string GetAll() { //优先返回独占条件 string exDesc = GetExDesc(); if (exDesc != "") { return(exDesc); } string cost = GetCost(); string desc = GetDesc(); if (desc != "" && cost != "") { return(string.Format("{0}\n{1}", cost, desc)); } else if (cost != "") { return(cost); } else if (desc != "") { return(desc); } else { return(UIUtil.Green(BaseLanguageMgr.Get("AC_您可以执行此操作"))); } }
// 获得消耗字符窜 public string GetCost() { if (IgnoreCondition) { return(""); } string mustCondition = ""; //必须条件 string cost = ""; if (andCacheConditions != null) { for (int i = 0; i < andCacheConditions.Count; ++i) { if (andCacheConditions[i].IsCost) { cost += andCacheConditions[i].GetCost(); } } } if (cost != "") { mustCondition = BaseLanguageMgr.Get("AC_消耗", cost); } return(mustCondition); }
public override string GetDesc(params object[] ps) { if (!Desc.IsInv()) { return(BaseLanguageMgr.Get(Desc, ps)); } return(BaseLanguageMgr.Get(NarrationId + "_" + FragmentIndex, ps)); }
public override string GetDesc(params object[] ps) { if (!Desc.IsInv()) { return(BaseLanguageMgr.Get(Desc, ps)); } return(BaseLanguageMgr.Get(TalkDescId, ps)); }
public BaseHUDItem JumpChatBubble(string key) { if (key.IsInvStr()) { return(null); } return(JumpChatBubbleStr(BaseLanguageMgr.Get(key))); }
protected string SetDesc(string str = "", params object[] obs) { str = BaseLanguageMgr.Get(str, obs); return(BaseUIUtils.Condition(GetRet(), str)); //if (GetRet()) // return BaseConstansMgr.STR_Indent + "<Color=green>" + str + "</Color>"; //return BaseConstansMgr.STR_Indent + "<Color=red>" + str + "</Color>"; }
/// <summary> /// 返回翻译后的名字 /// </summary> /// <returns></returns> public virtual string GetName() { if (!Name.IsInvStr()) { BaseLanguageMgr.Get(Name); } return(BaseLanguageMgr.Get(TDID)); }
public virtual string GetDesc(params object[] ps) { if (!Desc.IsInvStr()) { return(BaseLanguageMgr.Get(Desc, ps)); } return(BaseLanguageMgr.Get(NarrationId + "_" + Index, ps)); }
public virtual string GetDesc(params object[] ps) { if (!Desc.IsInvStr()) { return(BaseLanguageMgr.Get(Desc, ps)); } return(BaseLanguageMgr.Get(TalkDescId, ps)); }
public UHUDText JumpChatBubble(string key) { if (key.IsInv()) { return(null); } return(JumpChatBubbleStr(BaseLanguageMgr.Get(key))); }
public string GetDesc() { string str = BaseLanguageMgr.Get(key, objs); return(BaseUIUtils.Condition(isTrue, str)); //if (isTrue) // return BaseConstansMgr.STR_Indent + "<Color=green>" + str + "</Color>"; //return BaseConstansMgr.STR_Indent + "<Color=red>" + str + "</Color>"; }
public void JumpState(string key, bool needPlayer = false) { if (!IsCanJump(needPlayer)) { return; } string final = BaseLanguageMgr.Get(key); addToJumpFontList(final, StateJumpText); }
public string GetFemale(bool isTrans = false) { string ret = BaseMathUtils.RandArray(Last) + BaseLanguageMgr.Space + BaseMathUtils.RandArray(Female); if (isTrans) { return(BaseLanguageMgr.Get(ret)); } return(ret); }
// 只获得名称 public string RandName(bool isTrans = false) { string ret = RandUtil.RandArray(All); if (isTrans) { return(BaseLanguageMgr.Get(ret)); } return(ret); }
public void JumpTreatment(string key, bool needPlayer = false, params string[] objs) { if (!IsCanJump(needPlayer)) { return; } string final = BaseLanguageMgr.Get(key, objs); addToJumpFontList(final, TreatmentText); }
public JumpFontData?JumpStateStr(string key, [DefaultValue("Color.white")] Color col, bool needPlayer = false) { if (!IsCanJump(needPlayer)) { return(null); } string final = BaseLanguageMgr.Get(key); return(AddToJumpFontList(final, StateJumpText, col)); }
public string GetCurYearMonth() { return(string.Format( DateStrFormat_Month, GetTimeAgeType(), GetYear(), CurDateTime.Month, BaseLanguageMgr.Get("Unit_年"), BaseLanguageMgr.Get("Unit_月"))); }
/// <summary> /// 获取条件描述 /// </summary> /// <returns></returns> public string GetCacheDesc() { if (IgnoreCondition) { return(""); } // 进行一次全面判断 IsTrue(false, false); string mustCondition = ""; string orCondition = ""; //必须条件 string andDesc = ""; for (int i = 0; i < andCacheConditions.Count; ++i) { if (!andCacheConditions[i].IsIgnore) { andDesc += andCacheConditions[i].GetDesc(); } } for (int i = 0; i < andSimpleConditions.Count; ++i) { andDesc += andSimpleConditions[i].GetDesc(); } if (andDesc != "") { mustCondition = BaseLanguageMgr.Get("AC_需要满足条件", andDesc); } //条件之一 string orDesc = ""; for (int i = 0; i < orCacheConditions.Count; ++i) { if (!orCacheConditions[i].IsIgnore) { orDesc += orCacheConditions[i].GetDesc(); } } if (orSimpleConditions != null) { for (int i = 0; i < orSimpleConditions.Count; ++i) { orDesc += orSimpleConditions[i].GetDesc(); } } if (orDesc != "") { orCondition = BaseLanguageMgr.Get("AC_需要满足以下条件之一", orDesc); } return(mustCondition + orCondition); }
//获得人物评价 public string GetEvaluation() { if (IsCelebrity) { return(BaseLanguageMgr.Get("Text_历史名人")); } else { return(BaseLanguageMgr.Get("Text_无名鼠辈")); } }
public override string GetDesc() { string str = BaseLanguageMgr.Get(key, objs); if (!isTrue) { return(UIUtil.Red(str)); } else { return(UIUtil.Green(str)); } }
/// <summary> /// 通过枚举获得翻译的名称 /// </summary> /// <param name="myEnum"></param> /// <returns></returns> public static string[] GetEnumTransNames(this Type myEnum) { List <string> ret = new List <string>(); var array = GetFullEnumArray(myEnum); if (array != null) { foreach (var item in array) { ret.Add(BaseLanguageMgr.Get(item)); } } return(ret.ToArray()); }
// 设置buff信息 private static string AppendBuffHeadInfo(TData buff) { string CDTime = ""; if (buff.IsHaveRTMaxTime) { CDTime = string.Format("({0})", buff.RTMaxTime.ToString()); } else if (buff.IsHaveMaxTime) { CDTime = string.Format("({0})", buff.MaxTime.ToString()); } return(BaseLanguageMgr.Get("Buff_HeadInfo", buff.GetName(), CDTime)); }
/// <summary> /// 获取自动提示 /// </summary> /// <returns></returns> public virtual string GetDesc(params object[] ps) { if (!string.IsNullOrEmpty(Desc)) { return(BaseLanguageMgr.Get(Desc, ps)); } string temp = BaseConstMgr.Prefix_DescTrans + TDID; if (BaseLanguageMgr.IsContain(temp)) { return(BaseLanguageMgr.Get(temp, ps)); } return(BaseLanguageMgr.Get(BaseConstMgr.STR_Desc_NoDesc)); }
//此类型,基本不显示条件(保留) public override string GetDesc() { string retStr = ""; int index = 0; if (CostDatas == null) { return(retStr); } foreach (var item in CostDatas) { if (item.RealVal == 0) { continue; } if (!item.IsCondition) { continue; } bool tempBool = true; if (MathUtil.Round(GetAttrVal(item.Type), 2) < item.RealVal) { tempBool = false; } string tempstr = BaseLanguageMgr.Get("AC_IsAttrToAct", item.Type.GetName(), ACCompareType.MoreEqual.GetFull().GetName(), item.GetDesc(false, false, false)); if (tempBool) { retStr += Const.STR_Indent + UIUtil.Green(tempstr); } else { retStr += Const.STR_Indent + UIUtil.Red(tempstr); } if (index < CostDatas.Count - 1) { retStr += "\n"; } index++; } return(retStr); }
protected string GetStr(string key, params object[] ps) { return(BaseLanguageMgr.Get(key, ps)); }
/// <summary> /// 设置buff信息 /// </summary> /// <returns></returns> private string AppendBuffHeadInfo(TData buff) { return(BaseLanguageMgr.Get("Buff_HeadInfo", buff.GetName(), buff.MaxTime == 0.0f ? BaseLanguageMgr.Get("永久") : buff.MaxTime.ToString())); }
public override string GetName() { return(BaseLanguageMgr.Get(Name)); }