1
0
mirror of https://github.com/DarthAffe/CUE.NET.git synced 2025-12-12 08:48:30 +00:00

Added an effect-list to the effect-target

This commit is contained in:
Darth Affe 2017-04-27 20:50:19 +02:00
parent 33bd76ef0a
commit 86c9fb3860
3 changed files with 19 additions and 2 deletions

View File

@ -345,6 +345,12 @@ namespace CUE.NET.Devices.Generic
#region Effects
/// <summary>
/// Gets a list of all active effects of this target.
/// For this device this is always null.
/// </summary>
public IList<IEffect<ILedGroup>> Effects => null;
/// <summary>
/// NOT IMPLEMENTED: Effects can't be applied directly to the device. Add it to the Brush or create a ledgroup instead.
/// </summary>

View File

@ -24,7 +24,7 @@ namespace CUE.NET.Effects
/// <summary>
/// Gets all <see cref="IEffect{T}" /> attached to this target.
/// </summary>
protected IList<IEffect<T>> Effects => EffectTimes.Select(x => x.Effect).Cast<IEffect<T>>().ToList();
public IList<IEffect<T>> Effects => EffectTimes.Select(x => x.Effect).Cast<IEffect<T>>().ToList();
/// <summary>
/// Gets the strongly-typed target used for the effect.

View File

@ -1,14 +1,25 @@
// ReSharper disable UnusedMember.Global
using System.Collections.Generic;
namespace CUE.NET.Effects
{
/// <summary>
/// Represents a basic effect-target.
/// </summary>
/// <typeparam name="T">The type this target represents.</typeparam>
public interface IEffectTarget<out T>
public interface IEffectTarget<T>
where T : IEffectTarget<T>
{
#region Properties & Fields
/// <summary>
/// Gets a list of all active effects of this target.
/// </summary>
IList<IEffect<T>> Effects { get; }
#endregion
#region Methods
/// <summary>