diff options
Diffstat (limited to 'Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs')
-rw-r--r-- | Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs b/Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs new file mode 100644 index 0000000..7ee2299 --- /dev/null +++ b/Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs @@ -0,0 +1,22 @@ +#if UNITY_ANIMATION_GRAPH + +using UnityEngine.Graphs.LogicGraph; +using UnityEngine; + +namespace UnityEngine.Graphs +{ + public class AnimationNodeLibrary + { + [AnimationLogic(typeof(Animation))] + public static void SetSpeed1 (Animation self, string animName, float speed) + { + // Sanity check + if (self) + self[animName].speed = speed; + else + Debug.LogWarning("SetSpeed self parameter is null"); + } + } +} + +#endif |