Hi all,
I am doing a check to see if an animation is playing so i can get Mario to walk after he lands from a jump and make the jump animation stop.
The problem is that the code i am using does not work, i have seen examples here and they seem to be working for others so i would like to figure out where i am going wrong.
if (velocity.x < 0)
{
velocity *= walkSpeed;
if (anim.isPlaying() && anim.currentClip.name != "MarioSmallWalkLeft")
anim.Play("MarioSmallWalkLeft");
jumpEnable = false;
}
the problem is with the if (anim.isPlaying() && anim.currentClip.name != "MarioSmallWalkLeft") line.
the error i am getting is `tk2dAnimatedSprite.currentClip' is inaccessible due to its protection level.
Can anyone shed any light on why this is happening?
Thanks.