zip压缩加载测试
This commit is contained in:
61
Assets/Main/Script/Runtime/HotUpdate/MainDomain.cs
Normal file
61
Assets/Main/Script/Runtime/HotUpdate/MainDomain.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
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<IZoneSystem>().CreatZone(this.transform);
|
||||
this.GetSystem<IDigitalHuman>().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<MainArchitecture>
|
||||
{
|
||||
protected override void Init()
|
||||
{
|
||||
//注册示例
|
||||
//RegisterSystem<IScoreSystem>(new ScoreSystem());
|
||||
RegisterData<IZoneData>(new ZoneGatherData());
|
||||
RegisterSystem<IZoneSystem>(new ZoneSystem());
|
||||
RegisterSystem<IDigitalHuman>(new DigitalHuman());
|
||||
RegisterSystem<IVideoSystem>(new VideoSystem());
|
||||
RegisterSystem<IPanelSystem>(new PanelSystem());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user