Rewrite Hierachy that shockers now contain the api they use.
This commit is contained in:
@ -1,5 +1,24 @@
|
||||
namespace CShocker.Shockers.Abstract;
|
||||
using CShocker.Devices.Abstract;
|
||||
using CShocker.Devices.Additional;
|
||||
|
||||
public interface IShocker
|
||||
namespace CShocker.Shockers.Abstract;
|
||||
|
||||
public abstract class Shocker : IDisposable
|
||||
{
|
||||
public Api Api { get; }
|
||||
|
||||
internal Shocker(Api api)
|
||||
{
|
||||
this.Api = api;
|
||||
}
|
||||
|
||||
public void Control(ControlAction action, int? intensity = null, int? duration = null)
|
||||
{
|
||||
this.Api.Control(action, intensity, duration, this);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Api.Dispose();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user