public interface IStateOwner
{
Task TranslateState<TState>(object[] args);
}
public abstract class State <TOwner> where TOwner: IStateOwner
{
public abstract Task OnEnter();
}
热更层代码
public class GameManager: IStateOwner
{
public Task TranslateState<TState>(object[] args)
{
throw new NotImplementedException();
}
}
public class GameState_Version : State<GameManager>
{
public override Task OnEnter()
{
Debug.Log("GameState_Version->OnEnter");
return null;
}
}
AOT代码
热更层代码