wiki.sine.space | sinespace

Difference between revisions of "Scripting/SAnimationState"

From wiki.sine.space
Jump to: navigation, search
(Created page with "The AnimationState gives full control over animation blending. The interface allows users to modify speed, weight and time while any animation is playing. =Properties= {{Scr...")
 
(Replaced content with "This page has moved to: https://docs.sine.space/v/scripting/client-scripting/types/sanimationstate")
 
Line 1: Line 1:
The AnimationState gives full control over animation blending.
+
This page has moved to: https://docs.sine.space/v/scripting/client-scripting/types/sanimationstate
The interface allows users to modify speed, weight and time while any animation is playing.
+
 
+
 
+
=Properties=
+
{{ScriptFunction|bool|Enabled|[get, set]|Returns true if current AnimationState is enabled.|5=local anim=Space.Host.ExecutingObject.Animation<br>
+
local state = anim.GetState()<br>
+
Space.Log(state.Enabled)
+
}}
+
 
+
{{ScriptFunction|float|Length|[get;]|Returns the length of current animation.|5=local anim=Space.Host.ExecutingObject.Animation<br>
+
local state = anim.GetState()<br>
+
Space.Log(state.Length)
+
}}
+
 
+
{{ScriptFunction|string|Name|[get;]|Returns the name of current animation.|5=local anim=Space.Host.ExecutingObject.Animation<br>
+
local state = anim.GetState()<br>
+
Space.Log(state.Name)
+
}}
+
 
+
{{ScriptFunction|float|NormalizedSpeed|[get, set]|Returns the normalized speed of current animation.|5=local anim=Space.Host.ExecutingObject.Animation<br>
+
local state = anim.GetState()<br>
+
Space.Log(state.NormalizedSpeed)
+
}}
+
 
+
{{ScriptFunction|float|NormalizedTime|[get, set]|Returns the normalized time of current animation.|5=local anim=Space.Host.ExecutingObject.Animation<br>
+
local state = anim.GetState()<br>
+
Space.Log(state.NormalizedTime)
+
}}
+
 
+
{{ScriptFunction|float|Speed|[get, set]|Returns the Speed of current animation.|5=local anim=Space.Host.ExecutingObject.Animation<br>
+
local state = anim.GetState()<br>
+
Space.Log(state.Speed)
+
}}
+
 
+
 
+
{{ScriptFunction|float|Time|[get, set]|Returns the Time of current animation.|5=local anim=Space.Host.ExecutingObject.Animation<br>
+
local state = anim.GetState()<br>
+
Space.Log(state.Time)
+
}}
+
 
+
{{ScriptFunction|float|Weight|[get, set]|Returns the Weight of current animation.|5=local anim=Space.Host.ExecutingObject.Animation<br>
+
local state = anim.GetState()<br>
+
Space.Log(state.Weight)
+
}}
+
 
+
{{Scripting Navbox}}
+

Latest revision as of 07:41, 19 September 2022

This page has moved to: https://docs.sine.space/v/scripting/client-scripting/types/sanimationstate