Files
plugin-library/Assets/Domain/Test/HotUpdate/TestDomain.cs

50 lines
1.3 KiB
C#
Raw Normal View History

2025-09-24 15:34:24 +08:00
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());
}
}
}