|
|
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}}
| + | |