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); } } }