Added an effect-list to the effect-target

This commit is contained in:
DarthAffe committed 2017-04-27 20:50:19 +02:00
1 parent 33bd76ef0a
commit 86c9fb3860
3 files changed
+19 -2

No files matched your search

+6
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>
+1 -1
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.
+12 -1
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>