When I do this:
[gameLayer pauseSchedulerAndActions];
Most of the game pauses, but the sprites that are undergoing this action do not pause spinning:
[sprite runAction:[CCRepeatForever actionWithAction:[CCRotateBy actionWithDuration:5.0 angle:…
I'm new to Cocos2dx and I'm trying to create a planet animation rotate itself by using a 3:1 rectangle texture, which contains 3 squares are two faces (map) of sphere (the third square is a clone of the first one). I create a frames array by…
The delayperunit property in my code below keeps the sprite on screen for 2.5 seconds before it changes. What I actually want to do is display the sprite for 0.5 seconds so that there is 2.0 second break (no animation displayed) before the next one…
I have a sprite that I am rotating on a menu screen in my Cocos2d game like this:
CCAction* action = [CCRepeatForever actionWithAction:
[CCRotateBy actionWithDuration:1.0 angle:90.0f]];
[sprite runAction:action];
The…
I want my action have an effect ease in / ease out, but I already have CCSequence. If I put CCEaseOut in front of my code, movement become weird.
Is it possible to make CCEaseOut/CCEaseIn with CCSequence ?
Here is my code :
[player…
For my project, I've created a running character. Currently, I am attempting to implement different animations for the character.
I've decided to create 2 different actions
1) CCAction *walkAction;
2) CCAction *jumpAction;
When the character is…
Is it possible to make a CCSprite switch between two different animations? (both are CCRepeatForever)
I try to use stopAction: and runAction: but it crashes the app.
I can only use pauseSchedulerAndActions: and resumeSchedulerAndActions: with one…
I've been having problems with CCMenuItem and its timing with CCCallFunc.
Basically I'm getting 'EXC_BAD_ACCESS'
@ this line of the CCMenuItem class
-(void) ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event
{
...
[selectedItem_…
I'm getting stuck to implement some Cocos2D animations for my Tetris clone(that works perfectly, no logic bugs, i just want to perform some smooth animation when deleting rows).
The current code(no animation) just drops the block position, like…
I need to run sequential cocos2d actions on different nodes. I know about CCSequence but that is not good for me since it allows running sequence of actions on the same node. How would I go about running sequential actions for this scenario:
Move…
Is there a way to export Flash tweens so that we can use them in cocos2d-x?
Our goals are to let our artist use flash to create the dialog animations, and then export the matrix animations (not the images). Then we would use the matrix animations to…
I have sprite with a Move action, I want to call a function with 3 parameters when sprite finish Move action, I try to use CC_CALLBACK_3and CallFuncN
but i don't know where I put my parameters.
Sorry I'm new to this.
Right now I'm trying to create an endless randomly moving sprite that rotates to its direction. However I can't figure out how to use the random location generated from randomPoint on the rotateAction. Basically the bug…
I'm working on cocos2d V3.x project (SpriteBuilder V1.2.1). Currently trying to run this action sequence with a delay on a CCSprite. I'm not sure if there is a problem or maybe I just don't understand how CCActionSequence works.
I want action 'a' to…