// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable UnusedMember.Global
namespace RGB.NET.Core
{
///
/// Represents a basic effect targeting an .
///
public abstract class AbstractLedGroupEffect : IEffect
where T : ILedGroup
{
#region Properties & Fields
///
public bool IsEnabled { get; set; } = true;
///
public bool IsDone { get; protected set; }
///
/// Gets the this effect is targeting.
///
protected T LedGroup { get; set; }
#endregion
#region Methods
///
public abstract void Update(double deltaTime);
///
public virtual bool CanBeAppliedTo(ILedGroup target)
{
return target is T;
}
///
public virtual void OnAttach(ILedGroup target)
{
LedGroup = (T)target;
}
///
public virtual void OnDetach(ILedGroup target)
{
LedGroup = default(T);
}
#endregion
}
///
/// Represents a basic effect targeting an .
///
public abstract class AbstractLedGroupEffect : AbstractLedGroupEffect
{ }
}