0.0 0


Hi i’m Mateus, and i’m new here and at forums at all,
so if i posted at wrong place, bear with me and just
aks that i’ll move this to right place.

My question is, i’m creating a new sprite at buildMarkSprite(int,int). (It is just a shortcut to: CCSprite::create(“nameOfAsset) )
it’s ok creating it, and CCSquence too. (Again it is just a shortcut)
but when i add it to”main layer" and ask to perform a sequence
it wont run anything.
What i’m doing wrong?

//call a helper method to build a mark sprite
//for player and position.
CCSprite markSprite = buildMarkSprite;
//call a helper method to build a animation. show it in fancy way.
sequence = buildShowMarkAnimation();

//block ui, so no further touches
//will be processed

//run animation


Hello Mateus
~~it might be helpful to see these build functions.
~~never heard of blockUI, what does it do? anything that would affect the updating of actions update() functions?



Hi Dan, thanks for reply.
I got it, right now.

First i was returning a CCSequence* from buildShowMarkAnimation.
I dont know why but when i moved to CCActionInterval* it worked like a charm.
It’s a pretty awkward because CCSequence inherits of CCActionInterval so CCSequence “is a” CCActionInterval
and should work like one. Do you know why just change the type of pointer cause this?

Ah, blockUI() is a helper method to set boolean uiBlocked variable. This is because when i’m performing
those animations i just wanna cancel all user touches. So in touchedEnded method i checks if
uiBlocked is true
and dont call any method. After animation callback is called i set it to false again.


If you’re using CCSequence like *create( action1, action2, action3, NULL ), it will return a CCActionInterval object. If you usecreateWithTwoActions( action1, action2 )* it will create a CCSequence object.