Inventory Engine v4.2
Loading...
Searching...
No Matches
MoreMountains.Tools.MMOffsetAnimation Class Reference

Use this class to offset an animation by a random range. More...

Inherits MonoBehaviour.

Public Member Functions

virtual void OffsetCurrentAnimation ()
 offsets the target animation

Public Attributes

float MinimumRandomRange = 0f
 the minimum amount (in seconds) by which to offset the animation
float MaximumRandomRange = 1f
 the maximum amount (in seconds) by which to offset the animation
int AnimationLayerID = 0
 the layer to affect
bool OffsetOnStart = true
 whether or not to apply that offset on Start
bool OffsetOnEnable = false
 whether or not to offset animation on enable
bool DisableAfterOffset = true
 whether or not to self disable after offsetting

Protected Member Functions

virtual void Awake ()
 On awake we store our animator.
virtual void Start ()
 On Start we offset our animation.
virtual void OnEnable ()
 On Enable we offset our animation if needed.

Protected Attributes

Animator _animator
AnimatorStateInfo _stateInfo

Detailed Description

Use this class to offset an animation by a random range.

Member Function Documentation

◆ Awake()

virtual void MoreMountains.Tools.MMOffsetAnimation.Awake ( )
protectedvirtual

On awake we store our animator.

◆ OffsetCurrentAnimation()

virtual void MoreMountains.Tools.MMOffsetAnimation.OffsetCurrentAnimation ( )
virtual

offsets the target animation

◆ OnEnable()

virtual void MoreMountains.Tools.MMOffsetAnimation.OnEnable ( )
protectedvirtual

On Enable we offset our animation if needed.

◆ Start()

virtual void MoreMountains.Tools.MMOffsetAnimation.Start ( )
protectedvirtual

On Start we offset our animation.

Member Data Documentation

◆ _animator

Animator MoreMountains.Tools.MMOffsetAnimation._animator
protected

◆ _stateInfo

AnimatorStateInfo MoreMountains.Tools.MMOffsetAnimation._stateInfo
protected

◆ AnimationLayerID

int MoreMountains.Tools.MMOffsetAnimation.AnimationLayerID = 0

the layer to affect

◆ DisableAfterOffset

bool MoreMountains.Tools.MMOffsetAnimation.DisableAfterOffset = true

whether or not to self disable after offsetting

◆ MaximumRandomRange

float MoreMountains.Tools.MMOffsetAnimation.MaximumRandomRange = 1f

the maximum amount (in seconds) by which to offset the animation

◆ MinimumRandomRange

float MoreMountains.Tools.MMOffsetAnimation.MinimumRandomRange = 0f

the minimum amount (in seconds) by which to offset the animation

◆ OffsetOnEnable

bool MoreMountains.Tools.MMOffsetAnimation.OffsetOnEnable = false

whether or not to offset animation on enable

◆ OffsetOnStart

bool MoreMountains.Tools.MMOffsetAnimation.OffsetOnStart = true

whether or not to apply that offset on Start


The documentation for this class was generated from the following file: