Cocos 2.0 - How to blink a sprite?
Hi, i follow some tutorials, but my sprite doenst blink. Or it is always visible, or it is hidden.
How i can do my sprite blink for 5 seconds?
Cocos 2.0 - How to blink a sprite?
Hi, i follow some tutorials, but my sprite doenst blink. Or it is always visible, or it is hidden.
How i can do my sprite blink for 5 seconds?
CCActionInterval* action1 = CCBlink::actionWithDuration(2, 10); ?
I try it, but the player is invisible when i do it:
void Player::blink()
{
//CCBlink blink = CCBlink::actionWithDuration;
CCActionInterval action1 = CCBlink::actionWithDuration(2, 10);
runAction(action1);
}
CCActionInterval* action1 = CCBlink::actionWithDuration(2, 10);
won’t let me compile without the *, maybe thats the problem, what environment are you developing from?
It has the “*”, but the editor remove
anyone, i think it doesnt works
Hi.
This is not working.
Can anyone help me?
post your complete code?
or reproduce this bug with a simple helloworld
This is the code:
void Player::blink() {
CCActionInterval action1 = CCBlink::actionWithDuration(2, 10);
runAction(action1);
}
or
void Player::blink() {
CCBlink blink = CCBlink::actionWithDuration(3, 9);
runAction(blink);
}
Player is a class that inherit from CCSprite
At same time might be there is some action already running on the code.