using ET.EventType; using ET; using System; using System.Collections.Generic; namespace ET { public class BattleStartEvent : AEvent_Sync { public override void Run(BattleStart args) { try { var zoneScene = args.zoneScene; Game.EventSystem.Publish_Sync(new ET.EventType.TranslateSceneStart { isAutoEnd = false }); Game.EventSystem.Publish(new ET.EventType.StateBuffUI_Init { zoneScene = args.zoneScene }).Coroutine(); Game.EventSystem.Publish_Sync(new ET.EventType.HideOthersUnit { zoneScene = args.zoneScene }); Team team = args.zoneScene.GetComponent().Get(zoneScene.GetComponent().LeaderId); foreach (Unit unit in team.GetAll()) { try { Game.EventSystem.Publish_Sync(new ET.EventType.SetHudCharacter_ChangeHp { unit = unit }); } catch (Exception e) { Log.Error(e); } } } catch (Exception e) { Log.Error(e); } } } }