/// <summary> /// 获取BUFF提示 /// </summary> /// <param name="buffInst"></param> /// <returns></returns> internal static TipStruct GetBuffTip(BuffInst buffInst) { BuffTemplate template = BuffTemplateData.GetData(buffInst.tplId); if (template == null) { return(null); } TipStruct tipStruct = new TipStruct() { name = template.szName, desc = template.szDesc, iconUrl = ResPath.GetUiImagePath(PackageName.BATTLE, template.szImg) }; return(tipStruct); }
/// <summary> /// 获取回合行为提示 /// </summary> /// <param name="boutAction"></param> /// <returns></returns> internal static TipStruct GetActionTip(BoutAction boutAction) { switch (boutAction.enemyAction) { case EnemyAction.ATTACK: var attackTip = new TipStruct() { name = GameText.ACTION_ATTACK, iconUrl = ResPath.GetUiImagePath(PackageName.BATTLE, "sword_icon"), desc = string.Format(GameText.BATTLE_5, boutAction.iValue) }; return(attackTip); default: Debug.LogError("unhandle enemy action type:" + boutAction.enemyAction); break; } return(null); }
internal void SetData(TipStruct tipStruct) { txtName.text = tipStruct.name; imgIcon.url = tipStruct.iconUrl; txtDesc.text = tipStruct.desc; }