/// <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 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); }
public override void OnBeAddedToData() { base.OnBeAddedToData(); int index = 0; TDBaseTalkFragment Lasted = null; foreach (var item in Fragments) { item.TalkIndex = index; index++; item.TalkId = TDID; Lasted = item; item.TalkDescId = item.TalkId + "_" + item.TalkIndex; } if (Lasted != null) { Lasted.IsLasted = true; } //获取Op for (int i = 0; i < Const.Val_MaxTalkOptionCount; i++) { string opKey = TDID + Const.Suffix_Op + "_" + i; if (BaseLanguageMgr.IsContain(opKey)) { Option.Add(opKey); } } }
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)); }
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>"; }
public virtual string GetDesc(params object[] ps) { if (!Desc.IsInvStr()) { return(BaseLanguageMgr.Get(Desc, ps)); } return(BaseLanguageMgr.Get(NarrationId + "_" + Index, ps)); }
/// <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(TalkDescId, ps)); }
public UHUDText JumpChatBubble(string key) { if (key.IsInv()) { return(null); } return(JumpChatBubbleStr(BaseLanguageMgr.Get(key))); }
public BaseHUDItem JumpChatBubble(string key) { if (key.IsInvStr()) { 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 string GetFemale(bool isTrans = false) { string ret = BaseMathUtils.RandArray(Last) + BaseLanguageMgr.Space + BaseMathUtils.RandArray(Female); if (isTrans) { return(BaseLanguageMgr.Get(ret)); } return(ret); }
public void JumpState(string key, bool needPlayer = false) { if (!IsCanJump(needPlayer)) { return; } string final = BaseLanguageMgr.Get(key); addToJumpFontList(final, StateJumpText); }
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 string RandName(bool isTrans = false) { string ret = RandUtil.RandArray(All); if (isTrans) { return(BaseLanguageMgr.Get(ret)); } return(ret); }
public string GetOpHintStr(BaseEventOption option) { string finalStr = Const.Prefix_Lang_OptHintTrans + TDID + option.Index; if (!BaseLanguageMgr.IsContain(finalStr)) { finalStr = "CommonOptHint"; } return(Util.GetStr(finalStr, Options[option.Index].Rewards.GetDesc())); }
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_月"))); }
//获得人物评价 public string GetEvaluation() { if (IsCelebrity) { return(BaseLanguageMgr.Get("Text_历史名人")); } else { return(BaseLanguageMgr.Get("Text_无名鼠辈")); } }
/// <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 override void OnBeAddedToData() { base.OnBeAddedToData(); LastNameKeys.Clear(); LastNameKeys = BaseLanguageMgr.GetCategory(Last); All.Clear(); All.AddRange(Male.NameKeys); All.AddRange(Female.NameKeys); All.AddRange(LastNameKeys); Male.Parse(); Female.Parse(); }
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 void Parse() { ParseTag(PBare, SBare); ParseTag(PEye, SEye); ParseTag(PNose, SNose); ParseTag(PHair, SHair); ParseTag(PMouse, SMouse); ParseTag(PBrow, SBrow); ParseTag(PBeard, SBeard); ParseTag(PBody, SBody); ParseTag(PDecorate, SDecorate); ParseTag(PBG, SBG); ParseTag(PHelmet, SHelmet); ParseTag(PFrame, SFrame); NameKeys = BaseLanguageMgr.GetCategory(Name); }