Hey,
I'm sorry to bother with such a seemingly simple problem, but I'd like a quick solution. I just discovered the flipping function in tk2d, this whole time I've had animations for right and left. I fixed it, but I ran into a problem with FlipX:
public void PlayerAnimation()
{
playerAnimation.anim = playerSprite;
playerAnimation.AnimationName = "Idle";
if (playerMovement.physicalMoveDirection.x > 0)
{
playerAnimation.AnimationName = "Walk";
}
else
if(playerMovement.physicalMoveDirection.x < 0)
{
playerAnimation.AnimationName = "Walk";
playerBaseSprite.FlipX();
}
playerAnimation.AnimationPlayer();
}
I'm just looking for FlipX to happen only once. Sorry if there's a really simple solution I'm just missing, I really appreciate the help. Thanks in advance.