-
-
Notifications
You must be signed in to change notification settings - Fork 910
/
AnimationKeyFrame.cs
30 lines (26 loc) · 1.1 KB
/
AnimationKeyFrame.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Stride contributors (https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
#pragma warning disable SA1402 // File may only contain a single type
using Stride.Core;
namespace Stride.Animations
{
[DataContract]
[Display("KeyFrame")]
public class AnimationKeyFrame<T> where T : struct
{
private T val;
[DataMember(20)]
[Display("Value")]
public T Value { get { return val; } set { val = value; HasChanged = true; } }
private float key;
[DataMember(10)]
[Display("Key")]
public float Key { get { return key; } set { key = value; HasChanged = true; } }
private AnimationKeyTangentType tangentType = AnimationKeyTangentType.Linear;
[DataMember(30)]
[Display("Tangent")]
public AnimationKeyTangentType TangentType { get { return tangentType; } set { tangentType = value; HasChanged = true; } }
[DataMemberIgnore]
public bool HasChanged = true;
}
}