using ET; using ET.EventType; namespace ET { public class ClickBattleTargetEvent: AEvent { public override async ETTask Run(ClickBattleTarget args) { var zoneScene = args.zoneScene; switch (args.unitType) { case UnitType.Enermy: { M2C_SelectEnermy ret = await zoneScene.GetComponent().Call(new C2M_SelectEnermy { Id = zoneScene.GetComponent().SelectBattleUnitId }); if (!ret.Message.IsNullOrEmpty()) { Game.EventSystem.Publish(new ET.EventType.ShowTipUI { tip = ret.Message }).Coroutine(); return; } } break; case UnitType.TeamMember: { M2C_SelectTeamMember ret = await zoneScene.GetComponent().Call(new C2M_SelectTeamMember { Id = zoneScene.GetComponent().SelectBattleUnitId }); if (!ret.Message.IsNullOrEmpty()) { Game.EventSystem.Publish(new ET.EventType.ShowTipUI { tip = ret.Message }).Coroutine(); return; } } break; } } } }