AxibugEmuOnline/AxibugEmuOnline.Client/Assets/MyNes.Core/IZapperConnecter.cs

22 lines
505 B
C#
Raw Normal View History

2024-07-22 13:09:27 +08:00
using Unity.IL2CPP.CompilerServices;
2024-07-03 18:22:22 +08:00
namespace MyNes.Core
2024-07-03 18:15:28 +08:00
{
2024-07-22 13:09:27 +08:00
[Il2CppSetOption(Option.NullChecks, false)]
[Il2CppSetOption(Option.ArrayBoundsChecks, false)]
[Il2CppSetOption(Option.DivideByZeroChecks, false)]
2024-07-03 18:22:22 +08:00
public abstract class IZapperConnecter
{
protected bool Trigger;
2024-07-03 18:15:28 +08:00
2024-07-03 18:22:22 +08:00
protected bool State;
2024-07-03 18:15:28 +08:00
2024-07-03 18:22:22 +08:00
public abstract void Update();
2024-07-03 18:15:28 +08:00
2024-07-03 18:22:22 +08:00
public virtual byte GetData()
{
return (byte)((Trigger ? 16u : 0u) | (State ? 8u : 0u));
}
}
2024-07-03 15:40:13 +08:00
}