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

17 lines
303 B
C#
Raw Normal View History

2024-07-03 18:22:22 +08:00
namespace MyNes.Core
2024-07-03 18:15:28 +08:00
{
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
}