From 15740faf9fe9fe4be08965098bbf2947e096aeeb Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 14 Aug 2019 22:50:43 +0800 Subject: +Unity Runtime code --- .../UnityEngine.Graphs/AnimationNodeLibrary.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs (limited to 'Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs') 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 -- cgit v1.1-26-g67d0