Game Development Reference
In-Depth Information
//action to rotate sprites
auto rotate = RotateBy::create(0.5f , -90);
_rotateSprite = RepeatForever::create( rotate );
_rotateSprite->retain();
3. First, another
Sequence
. This will fade out the sprite and call the
shock-
waveDone
function, which is already implemented in the class and turns the
_shockwave
sprite invisible when called.
4. The last one is a
RepeatForever
action of a
RotateBy
action. In half a
second, the sprite running this action will rotate
-90
degrees and will do that
again and again.