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