using System.Threading.Tasks; using Stary.Evo; using Stary.Evo.UIFarme; using UnityEngine; namespace Main { public class MainDomain :DomainBase,IController { public override void OnEnter(string param) { base.OnEnter(param); Debug.Log("UnityEvo: OnEnter进入成功"); } public override void OnExit() { base.OnExit(); GetArchitecture().Dispose(); Debug.Log("UnityEvo: OnExit退出成功"); } public override Task OnEnterAsync(string param) { Debug.Log("UnityEvo: OnEnterAsync进入成功"); this.GetSystem().CreatZone(this.transform); this.GetSystem().LoadKKController(this.transform); return base.OnEnterAsync(param); } public override Task OnExitAsync() { Debug.Log("UnityEvo: OnEnterAsync退出成功"); return base.OnExitAsync(); } public void OnDestroy() { GetArchitecture().Dispose(); } public IArchitecture GetArchitecture() { return MainArchitecture.Interface; } } public class MainArchitecture : Architecture { protected override void Init() { //注册示例 //RegisterSystem(new ScoreSystem()); RegisterData(new ZoneGatherData()); RegisterSystem(new ZoneSystem()); RegisterSystem(new DigitalHuman()); RegisterSystem(new VideoSystem()); RegisterSystem(new PanelSystem()); } } }