I was wondering how I could immediately make my CCSprite *van sprite automatically from the very beginning with a controlled speed, for example int *speed = 1, 2, 3+ . I looked around, but everything I found did not fit my needs. Is there a simple solution to this problem?
CCSprite *van
int *speed = 1, 2, 3+
You should use the CCSpeed ββaction:
CCSpeed* speed= [CCSpeed actionWithAction: yourMoveAction speed: 1.0f]; // yourMoveAction is an action like CCMoveTo for example [sprite runAction: speed];
Then you can change the speed while the sprite moves with setSpeed:
[speed setSpeed: 2.0f];