AnimationController
ThaumielMapEditor.API.Animation
Overviewβ
Propertiesβ
| Name | Type | Access | Description |
|---|---|---|---|
Animators | IReadOnlyList<Animator> | get | Gets a read-only list of all UnityEngine.Animator components found on the schematic's server-side objects. |
AttachedSchematic | SchematicData | get | Gets the attached ThaumielMapEditor.API.Data.SchematicData. |
Methodsβ
| Signature | Returns | Description |
|---|---|---|
Get(SchematicData) | AnimationController | Gets or creates an ThaumielMapEditor.API.Animation.AnimationController for the⦠|
Play(string, int) | void | Plays an animation state by name on the animator at the given index. |
Play(string, float, int) | void | Plays an animation state by name on the animator at the given index. |
Play(string, bool, int) | void | Sets a boolean parameter on the animator at the given index. |
Play(string, bool, float, int) | void | Sets a boolean parameter on the animator at the given index. |
Play(string, string) | void | Plays an animation state on the animator matching the given name. |
Play(string, string, float) | void | Plays an animation state on the animator matching the given name. |
Stop(int) | void | Stops playback on the animator at the given index. |
Stop(string) | void | Stops playback on the animator matching the given name. |
Propertiesβ
Animatorsβ
Type: IReadOnlyList<Animator>βAccess: get
Gets a read-only list of all UnityEngine.Animator components found on the schematic's server-side objects.
AttachedSchematicβ
Type: SchematicDataβAccess: get
Gets the attached ThaumielMapEditor.API.Data.SchematicData.
Methodsβ
Getβ
public AnimationController Get(SchematicData schematic)
Gets or creates an ThaumielMapEditor.API.Animation.AnimationController for the given ThaumielMapEditor.API.Data.SchematicData.
Parametersβ
| Name | Type | Description |
|---|---|---|
schematic | SchematicData | The schematic to look up. |
Returnsβ
AnimationController β The existing or newly created ThaumielMapEditor.API.Animation.AnimationController.
Playβ
public void Play(
string stateName,
int animatorIndex
)
Plays an animation state by name on the animator at the given index.
Parametersβ
| Name | Type | Description |
|---|---|---|
stateName | string | The state to play. |
animatorIndex | int | The index of the animator to use. |
Playβ
public void Play(
string stateName,
float speed,
int animatorIndex
)
Plays an animation state by name on the animator at the given index.
Parametersβ
| Name | Type | Description |
|---|---|---|
stateName | string | The state to play. |
speed | float | The speed to play the animation at. |
animatorIndex | int | The index of the animator to use. |
Playβ
public void Play(
string animParam,
bool state,
int animatorIndex
)
Sets a boolean parameter on the animator at the given index.
Parametersβ
| Name | Type | Description |
|---|---|---|
animParam | string | The animator parameter name. |
state | bool | The boolean value to set. |
animatorIndex | int | The index of the animator to use. |
Playβ
public void Play(
string animParam,
bool state,
float speed,
int animatorIndex
)
Sets a boolean parameter on the animator at the given index.
Parametersβ
| Name | Type | Description |
|---|---|---|
animParam | string | The animator parameter name. |
state | bool | The boolean value to set. |
speed | float | The speed to play the animation at. |
animatorIndex | int | The index of the animator to use. |
Playβ
public void Play(
string stateName,
string animatorName
)
Plays an animation state on the animator matching the given name.
Parametersβ
| Name | Type | Description |
|---|---|---|
stateName | string | The state to play. |
animatorName | string | The name of the animator GameObject to target. |
Playβ
public void Play(
string stateName,
string animatorName,
float speed
)
Plays an animation state on the animator matching the given name.
Parametersβ
| Name | Type | Description |
|---|---|---|
stateName | string | The state to play. |
animatorName | string | The name of the animator GameObject to target. |
speed | float | The speed to play the animation at. |
Stopβ
public void Stop(int animatorIndex)
Stops playback on the animator at the given index.
Parametersβ
| Name | Type | Description |
|---|---|---|
animatorIndex | int | The index of the animator to stop. |
Stopβ
public void Stop(string animatorName)
Stops playback on the animator matching the given name.
Parametersβ
| Name | Type | Description |
|---|---|---|
animatorName | string | The name of the animator GameObject to stop. |