Class MyAnimationControllerComponent
Entity component containing animation controller.
Inheritance
System.Object
MyAnimationControllerComponent
Assembly: VRage.Game.dll
Syntax
public class MyAnimationControllerComponent : MyEntityComponentBase, IMyEntityComponentBase, IMyComponentBase
Constructors
MyAnimationControllerComponent(MyEntity, Action, IMyTerrainHeightProvider)
Declaration
public MyAnimationControllerComponent(MyEntity entity, Action obtainBones, IMyTerrainHeightProvider heightProvider)
Parameters
Type |
Name |
Description |
MyEntity |
entity |
|
System.Action |
obtainBones |
|
VRageRender.Animations.IMyTerrainHeightProvider |
heightProvider |
|
Fields
CameraDistance
Declaration
public float CameraDistance
Field Value
Type |
Description |
System.Single |
|
MainLayerAnimationSpeed
Declaration
public float MainLayerAnimationSpeed
Field Value
Type |
Description |
System.Single |
|
OtherLayersAnimationSpeed
Declaration
public float OtherLayersAnimationSpeed
Field Value
Type |
Description |
System.Single |
|
ReloadBonesNeeded
Declaration
public readonly Action ReloadBonesNeeded
Field Value
Type |
Description |
System.Action |
|
Properties
Declaration
public Matrix[] BoneAbsoluteTransforms { get; }
Property Value
Declaration
public Matrix[] BoneRelativeTransforms { get; }
Property Value
CharacterBones
Get reference to array of character pack and its contents.
Declaration
public MyCharacterBone[] CharacterBones { get; }
Property Value
Type |
Description |
VRageRender.Animations.MyCharacterBone[] |
|
CharacterBonesSorted
Declaration
public MyCharacterBone[] CharacterBonesSorted { get; }
Property Value
Type |
Description |
VRageRender.Animations.MyCharacterBone[] |
|
ComponentTypeDebugString
Name of the component type for debug purposes (e.g.: "Position")
Declaration
public override string ComponentTypeDebugString { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
Controller
Get the animation controller instance.
Declaration
public MyAnimationController Controller { get; }
Property Value
Type |
Description |
VRageRender.Animations.MyAnimationController |
|
InverseKinematics
Get the instance of inverse kinematics.
Declaration
public MyAnimationInverseKinematics InverseKinematics { get; }
Property Value
Type |
Description |
VRageRender.Animations.MyAnimationInverseKinematics |
|
LastFrameActions
Declaration
public List<MyStringId> LastFrameActions { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<MyStringId> |
|
LastRawBoneResult
Declaration
public MyAnimationClip.BoneState[] LastRawBoneResult { get; }
Property Value
Type |
Description |
VRageRender.Animations.MyAnimationClip.BoneState[] |
|
SourceId
Declaration
public MyDefinitionId SourceId { get; set; }
Property Value
Variables
Get the variable storage of animation controller instance. Shortcut.
Declaration
public IMyVariableStorage<float> Variables { get; }
Property Value
Type |
Description |
VRage.Generics.IMyVariableStorage<System.Single> |
|
Methods
ApplyVariables()
Declaration
public void ApplyVariables()
AttachAnimationEventCallback(Action<List<String>>)
Declaration
public void AttachAnimationEventCallback(Action<List<string>> action)
Parameters
Type |
Name |
Description |
System.Action<System.Collections.Generic.List<System.String>> |
action |
|
Clear()
Declaration
DetachAnimationEventCallback(Action<List<String>>)
Declaration
public void DetachAnimationEventCallback(Action<List<string>> action)
Parameters
Type |
Name |
Description |
System.Action<System.Collections.Generic.List<System.String>> |
action |
|
FindBone(String, out Int32)
Declaration
public MyCharacterBone FindBone(string name, out int index)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Int32 |
index |
|
Returns
Type |
Description |
VRageRender.Animations.MyCharacterBone |
|
FinishUpdate()
Declaration
public void FinishUpdate()
GetKeyedAnimationTracks(String)
Declaration
public List<MyAnimationTreeNode> GetKeyedAnimationTracks(string key)
Parameters
Type |
Name |
Description |
System.String |
key |
|
Returns
Type |
Description |
System.Collections.Generic.List<VRageRender.Animations.MyAnimationTreeNode> |
|
MarkAsValid()
Declaration
public void MarkAsValid()
OnAddedToContainer()
Component was added in the entity component container.
Declaration
public override void OnAddedToContainer()
Overrides
OnBeforeRemovedFromContainer()
Component will be removed from entity component container.
Declaration
public override void OnBeforeRemovedFromContainer()
Overrides
SetCharacterBones(MyCharacterBone[], Matrix[], Matrix[])
Declaration
public void SetCharacterBones(MyCharacterBone[] characterBones, Matrix[] relativeTransforms, Matrix[] absoluteTransforms)
Parameters
Type |
Name |
Description |
VRageRender.Animations.MyCharacterBone[] |
characterBones |
|
Matrix[] |
relativeTransforms |
|
Matrix[] |
absoluteTransforms |
|
TriggerAction(MyStringId, String[])
Trigger an action in the layers specified. If no layers are specified, it is triggered for all instead.
If there is a transition having given (non-null) name, it is followed immediatelly.
Conditions of transition are ignored.
This is a shortcut to Controller.TriggerAction.
Declaration
public void TriggerAction(MyStringId actionName, string[] layers = null)
Parameters
Type |
Name |
Description |
MyStringId |
actionName |
|
System.String[] |
layers |
|
Update()
Declaration
Returns
Type |
Description |
System.Boolean |
|
UpdateInverseKinematics()
Declaration
public void UpdateInverseKinematics()
Declaration
public void UpdateTransformations()
Events
ActionTriggered
Declaration
public event Action<MyStringId> ActionTriggered
Event Type
Extension Methods