1111
This commit is contained in:
48
Assets/00.StaryEvoTools/Resources/DomainTemplate.txt
Normal file
48
Assets/00.StaryEvoTools/Resources/DomainTemplate.txt
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.Threading.Tasks;
|
||||
using Stary.Evo;
|
||||
using UnityEngine;
|
||||
namespace NamespaceX
|
||||
{
|
||||
public class ClassNameXX :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进入成功");
|
||||
return base.OnEnterAsync(param);
|
||||
}
|
||||
|
||||
public override Task OnExitAsync()
|
||||
{
|
||||
Debug.Log("UnityEvo: OnEnterAsync退出成功");
|
||||
return base.OnExitAsync();
|
||||
}
|
||||
|
||||
public IArchitecture GetArchitecture()
|
||||
{
|
||||
return ReturnArchitecture.Interface;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ArchitectureX : Architecture<ArchitectureX>
|
||||
{
|
||||
protected override void Init()
|
||||
{
|
||||
//注册示例
|
||||
//RegisterSystem<IScoreSystem>(new ScoreSystem());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user