void ComponentSpine::addAnimation(const graphics::SpineManagerItem * _animation, const int track_index, const bool loop, const float delay)
{
    auto __animation = * const_cast<graphics::SpineManagerItem *>(_animation);

    updateSpine(__animation);

    spAnimationState_addAnimation(animationState, track_index, __animation.getAnimation(), loop, delay);
}
void PlayerCar::update()
{
	updateSpine();
	spriteSheet->Step();
	jump();
	if (isJumping)
	{
		if (y > jumpMaxY && jumpingUp)
		{
			/*if (y > jumpMaxY + 3*((initY - jumpMaxY)/4))
			{
				drawImg = jumpImg2;
			}
			else if (y > jumpMaxY + 2*((initY - jumpMaxY)/4))
			{
				drawImg = jumpImg2;
			}
			else if (y > jumpMaxY + ((initY - jumpMaxY)/4))
			{
				drawImg = jumpImg3;
			}*/
			y -= (initY - jumpMaxY)/(jumpCount*3);
			if (jumpCount < 9)
				jumpCount++;
		}
		else if (y < initY)
		{
			/*if (y < jumpMaxY + ((initY - jumpMaxY)/4))
			{
				drawImg = jumpImg3;
			}
			else if (y < jumpMaxY + 2*((initY - jumpMaxY)/4))
			{
				drawImg = jumpImg3;
			}
			else if (y > jumpMaxY + 3*((initY - jumpMaxY)/4))
			{
				drawImg = jumpImg3;
			}*/
			y += (initY - jumpMaxY)/(jumpCount*3);
			if (jumpCount > 3)
			jumpCount--;
			jumpingUp = false;
		}
		else
		{
			y = initY;
			isJumping = false;
			jumpingUp = false;
			jumpCount = 3;
		}
	}

}