Started work on the keyframe engine to tie everything together!

This commit is contained in:
Robert committed 2020-01-08 14:35:29 +01:00
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();
}
}
}