2024-09-23 18:15:34 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
namespace AxibugEmuOnline.Client
|
|
|
|
{
|
|
|
|
public interface IEmuCore
|
|
|
|
{
|
2024-11-07 17:58:20 +08:00
|
|
|
GameObject gameObject { get; }
|
|
|
|
|
2024-09-23 18:15:34 +08:00
|
|
|
object GetState();
|
|
|
|
byte[] GetStateBytes();
|
|
|
|
void LoadState(object state);
|
|
|
|
void LoadStateFromBytes(byte[] data);
|
|
|
|
void Pause();
|
|
|
|
void Resume();
|
2024-11-07 17:58:20 +08:00
|
|
|
void SetupScheme();
|
|
|
|
void StartGame(RomFile romFile);
|
2024-11-13 18:42:30 +08:00
|
|
|
void DoReset();
|
2024-11-19 13:09:53 +08:00
|
|
|
uint Frame { get; }
|
2024-09-23 18:15:34 +08:00
|
|
|
}
|
2024-11-08 11:31:12 +08:00
|
|
|
|
|
|
|
public static class IEnumCoreTool
|
|
|
|
{
|
|
|
|
public static bool IsNull(this IEmuCore core)
|
|
|
|
{
|
|
|
|
if (core == null) return true;
|
|
|
|
return core.Equals(null);
|
|
|
|
}
|
|
|
|
}
|
2024-09-23 18:15:34 +08:00
|
|
|
}
|