You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.2 KiB
44 lines
1.2 KiB
3 years ago
|
using ET.EventType;
|
||
|
|
||
|
namespace ET
|
||
|
{
|
||
|
public static class BattleViewHelper
|
||
|
{
|
||
|
public static string GetAttackTypeMsg(AtkInfo atkInfo)
|
||
|
{
|
||
|
int atkType = atkInfo.AtkType;
|
||
|
|
||
|
string msg = "";
|
||
|
|
||
|
switch (atkType)
|
||
|
{
|
||
|
case ConstAtkType.ATK_ACTIVE:
|
||
|
msg = "主动攻击";
|
||
|
if (atkInfo.SonSkillId > 0)
|
||
|
{
|
||
|
var config = SkillSonConfigCategory.Instance.Get(atkInfo.SonSkillId);
|
||
|
msg = config.Name;
|
||
|
}
|
||
|
break;
|
||
|
case ConstAtkType.ATK_BACK:
|
||
|
msg = "反击";
|
||
|
break;
|
||
|
case ConstAtkType.ATK_HUNT:
|
||
|
msg = "追击";
|
||
|
break;
|
||
|
default:
|
||
|
msg = "未知";
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
return msg;
|
||
|
}
|
||
|
|
||
|
public static void ShowBattleUnitStateMsg(BattleUnitViewComponent battleUnitViewComponent, AtkInfo atkInfo)
|
||
|
{
|
||
|
string msg = GetAttackTypeMsg(atkInfo);
|
||
|
|
||
|
battleUnitViewComponent.ShowStateMsg(msg);
|
||
|
}
|
||
|
}
|
||
|
}
|