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 { 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 = TeamComponent.Instance.Get(GlobalVariable.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); } } } }