Line 15: | Line 15: | ||
}} | }} | ||
− | {{ScriptFunction|string|Parameter|{get; set;}| | + | {{ScriptFunction|string|Parameter|{get; set;}|The Parameter value which the Audio Reactive Animation is affecting in the target Animator.|5= |
local Object = Space.Scene.Find("Audio Source")<br> | local Object = Space.Scene.Find("Audio Source")<br> | ||
Space.Log(Object.SAudioReactiveAnimation.Parameter ) | Space.Log(Object.SAudioReactiveAnimation.Parameter ) | ||
}} | }} | ||
− | {{ScriptFunction|SAnimator|Target|{get; set;}| | + | {{ScriptFunction|SAnimator|Target|{get; set;}|The target Animator which the Audio Reactive Animation is affecting.|5=<pre>TargetAnimator = Space.Host.ExecutingObject.AudioReactiveAnimation.Target</pre>|6=<pre>--clicking this object toggles between two Audio Reactive Animation targets |
− | + | ||
− | Space. | + | thisObject = Space.Host.ExecutingObject |
+ | animator1 = Space.Host.GetReference("object1").Animator --add this reference to Scripting Runtime component | ||
+ | animator2 = Space.Host.GetReference("object2").Animator --add this reference to Scripting Runtime component | ||
+ | |||
+ | OnClick = function() | ||
+ | if thisObject.AudioReactiveAnimation.Target == animator1 then | ||
+ | thisObject.AudioReactiveAnimation.Target = animator2 | ||
+ | else | ||
+ | thisObject.AudioReactiveAnimation.Target = animator1 | ||
+ | end | ||
+ | |||
+ | end | ||
+ | |||
+ | thisObject.AddClickable() | ||
+ | thisObject.Clickable.OnClick(OnClick)</pre> | ||
}} | }} | ||
{{Scripting Navbox}} | {{Scripting Navbox}} |
Returns true if the Audio Reactive Animation Enabled.
--clicking this object will Enable/Disable it's Audio Reactive Animation component thisGameObject = Space.Host.ExecutingObject component = thisGameObject.AudioReactiveAnimation OnClick = function() component.Enabled = not component.Enabled end thisGameObject.AddClickable() thisGameObject.Clickable.OnClick(OnClick))
The Parameter value which the Audio Reactive Animation is affecting in the target Animator.
The target Animator which the Audio Reactive Animation is affecting.
TargetAnimator = Space.Host.ExecutingObject.AudioReactiveAnimation.Target
--clicking this object toggles between two Audio Reactive Animation targets thisObject = Space.Host.ExecutingObject animator1 = Space.Host.GetReference("object1").Animator --add this reference to Scripting Runtime component animator2 = Space.Host.GetReference("object2").Animator --add this reference to Scripting Runtime component OnClick = function() if thisObject.AudioReactiveAnimation.Target == animator1 then thisObject.AudioReactiveAnimation.Target = animator2 else thisObject.AudioReactiveAnimation.Target = animator1 end end thisObject.AddClickable() thisObject.Clickable.OnClick(OnClick)
|