summaryrefslogtreecommitdiff
path: root/Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs')
-rw-r--r--Runtime/Graphs/UnityEngine.Graphs/AnimationNodeLibrary.cs22
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