wiki.sine.space | sinespace

Difference between revisions of "Scripting/SAudioReactiveAnimation"

From wiki.sine.space
Jump to: navigation, search
(Created page with "=Properties= {{ScriptFunction|bool|Enabled|{get; set;}|Returns true if the Audio Reactive Animation Enabled.|5= local Object = Space.Scene.Find("Audio Source")<br> Space.Log(...")
 
Line 1: Line 1:
 
=Properties=
 
=Properties=
  
{{ScriptFunction|bool|Enabled|{get; set;}|Returns true if the Audio Reactive Animation Enabled.|5=
+
{{ScriptFunction|bool|Enabled|{get; set;}|Returns true if the Audio Reactive Animation Enabled.|5=Space.Host.ExecutingObject.AudioReactiveAnimation.Enabled = false|6=<pre>--clicking this object will Enable/Disable it's Audio Reactive Animation component
local Object = Space.Scene.Find("Audio Source")<br>
+
thisGameObject = Space.Host.ExecutingObject
Space.Log(Object.SAudioReactiveAnimation.Enabled)
+
component = thisGameObject.AudioReactiveAnimation
 +
 
 +
 
 +
OnClick = function()
 +
component.Enabled =  not component.Enabled
 +
end
 +
 
 +
 
 +
thisGameObject.AddClickable()
 +
thisGameObject.Clickable.OnClick(OnClick)</pre>)
 
}}
 
}}
  

Revision as of 03:32, 13 October 2021

Properties

Enabled

bool Enabled {get; set;}

Returns true if the Audio Reactive Animation Enabled.

Space.Host.ExecutingObject.AudioReactiveAnimation.Enabled = false


--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)
)

Parameter

string Parameter {get; set;}

Returns Parameter value of the Audio Reactive Animation.

local Object = Space.Scene.Find("Audio Source")
Space.Log(Object.SAudioReactiveAnimation.Parameter )


Target

SAnimator Target {get; set;}

Returns Target ApplyRootMotion value of the Audio Reactive Animation.

local Object = Space.Scene.Find("Audio Source")
Space.Log(Object.AudioReactiveAnimation.Target.ApplyRootMotion)