mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Started work on the keyframe engine to tie everything together!
This commit is contained in:
1 parent
7a3b5dec3e
commit
acdb90897e
28 files changed
+339
-107
No files matched your search
@@ -9,14 +9,18 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The value of the property without any keyframes applied
|
||||
/// </summary>
|
||||
public T Value
|
||||
{
|
||||
get => (T) BaseValue;
|
||||
get => BaseValue != null ? (T) BaseValue : default;
|
||||
set => BaseValue = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A list of keyframes defining different values of the property in time, this list contains the strongly typed <see cref="Keyframe{T}"/>
|
||||
/// A list of keyframes defining different values of the property in time, this list contains the strongly typed
|
||||
/// <see cref="Keyframe{T}" />
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<Keyframe<T>> Keyframes => BaseKeyframes.Cast<Keyframe<T>>().ToList().AsReadOnly();
|
||||
|
||||
@@ -45,5 +49,17 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
{
|
||||
BaseKeyframes.Clear();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current value using the keyframes
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public T GetCurrentValue()
|
||||
{
|
||||
if (KeyframeEngine == null)
|
||||
return Value;
|
||||
|
||||
return (T) KeyframeEngine.GetCurrentValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user