ParaPlayer.PlayAnimation

Declaration

public void PlayAnimation(AnimationClip clip, Action<AnimationEvent> cb = null, ParaAnimatorMask mask = ParaAnimatorMask.WholeBody)

Parameter

clip

The Action Clip is being played

cb

The callback of the Animation Event

mask

Animation Layer Mask Enumeration

Description

Plays an action. You can use the Animation Event and pass callback functions.

Sample

Using Animation Events

player:PlayAnimation(animationClip,
    function(animationEvent)
        if animationEvent.intParameter == 0 then
            -- TODO
        elseif animationEvent.intParameter == 1 then
      			-- Stop Animation
            player:StopAnimation()
        end
    end,
    ParaAnimatorMask.LeftArm)