ParaPlayer.PlayAnimation

Declaration

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

Parameter

clipThe Action Clip is being played
cbThe callback of the Animation Event
maskAnimation 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)