1
This commit is contained in:
50
Assets/Domain/Test/HotUpdate/TestDomain.cs
Normal file
50
Assets/Domain/Test/HotUpdate/TestDomain.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System.Threading.Tasks;
|
||||
using Stary.Evo;
|
||||
using UnityEngine;
|
||||
namespace Test
|
||||
{
|
||||
public class TestDomain :DomainBase,IController
|
||||
{
|
||||
public override void OnEnter(string param)
|
||||
{
|
||||
base.OnEnter(param);
|
||||
Debug.Log("UnityEvo: OnEnter进入成功");
|
||||
GameObject go = new GameObject("Launcher");
|
||||
go.AddComponent<Launcher>();
|
||||
}
|
||||
|
||||
public override void OnExit()
|
||||
{
|
||||
base.OnExit();
|
||||
GetArchitecture().OnDispose();
|
||||
Debug.Log("UnityEvo: OnExit退出成功");
|
||||
}
|
||||
|
||||
public override Task OnEnterAsync(string param)
|
||||
{
|
||||
Debug.Log("UnityEvo: OnEnterAsync进入成功");
|
||||
return base.OnEnterAsync(param);
|
||||
}
|
||||
|
||||
public override Task OnExitAsync()
|
||||
{
|
||||
Debug.Log("UnityEvo: OnEnterAsync退出成功");
|
||||
return base.OnExitAsync();
|
||||
}
|
||||
|
||||
public IArchitecture GetArchitecture()
|
||||
{
|
||||
return TestArchitecture.Interface;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class TestArchitecture : Architecture<TestArchitecture>
|
||||
{
|
||||
protected override void Init()
|
||||
{
|
||||
//注册示例
|
||||
//RegisterSystem<IScoreSystem>(new ScoreSystem());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user