[SOLVED] How could we play an animation just once and not loop it while using transition api?

I am using following api to play the animation, but I don’t want the animation to loop.

this.entity.anim.baseLayer.transition(‘dead’, 0.2);

I have coded as follows,

for (var i = 0; i < this.animationAssets.length; ++i) {

        var animationAsset = this.animationAssets[i];
        if(animationAsset.stateName == "dead" || animationAsset.stateName == "crouch")
            this.entity.anim.assignAnimation(animationAsset.stateName, animationAsset.asset.resource, false);
            this.entity.anim.assignAnimation(animationAsset.stateName, animationAsset.asset.resource);

Made the following changes, it is working now.

this.entity.anim.assignAnimation(animationAsset.stateName, animationAsset.asset.resource, 'Base', 1, false);

Just to wrap this up, the transitions are not responsible for the looping of animation states. The transitions control moving from one state to another. The state is responsible for looping.