ios,objective-c,cocos2d-iphone,cocos2d-iphone-3
There are many ways you can do this. But for the sake of simplicity the easiest way you can do this is via notifications. For example in the hud add: @implementation HudLayer - (void)onEnter { [super onEnter]; NSNotificationCenter* notiCenter = [NSNotificationCenter defaultCenter]; [notiCenter addObserver:self selector:@selector(onUpdateMonsterText:) name:@"HudLayerUpdateMonsterTextNotification" object:nil]; } - (void)onExit...
iphone,objective-c,cocos2d-iphone,cocos2d-iphone-3
From the OP I take that you have two issues with one being that the HUD is not static (i.e. it is moving as your map moves which you don't want) and that it is not positioning at the top of the screen. Looking at the position issue first, your...
objective-c,cocos2d-iphone,cocos2d-iphone-3
You already have the row/column available. They are j and k. Those variables can be referenced in your button's "on pressed" block.
cocos2d-iphone,cocos2d-iphone-3
Change -(BOOL)ccPhysicsCollisionBegin:(CCPhysicsCollisionPair *)pair typeA:(CCNode *)nodeA typeB:(CCNode *)nodeB{ To: -(BOOL)ccPhysicsCollisionBegin:(CCPhysicsCollisionPair *)pair tubeCollision:(CCNode *)nodeA birdCollision:(CCNode *)nodeB{ You have the example code of the collision delegate, so you have to adapt it to your code with your nodeA that is the tube and nodeB the bird....
cocos2d-iphone,cocos2d-iphone-3,cocos2d-swift
It's in the same github repo. Simply copy CCDictionary.{m,h} to your project, along with any other extension files you want to use.
objective-c,cocos2d-iphone,cocos2d-iphone-3
In decreaseTimeRemaining you create a local variable called timeRemainingString, but then you never use it to update the label. Also, you are creating a whole new label instead of updating the existing one. -(void)decreaseTimeRemaining{ timeRemaining--; NSString *timeRemainingString = [NSString stringWithFormat:@"%i", timeRemaining]; [_varyingParameterLabelValue setString:timeRemainingString]; } ...
android,spritebuilder,cocos2d-iphone-3,cocos2d-swift
I found out where was the problem, so I'll answer my own question :) The whole problem was in misleading logs. We need to modify function setupView: in Platforms/Android/CCGLView.m. CCGLView is logging EGL values before calling eglChooseConfig which sets depth and stencil size to 0. Moving line logConfig(_eglDisplay, _eglConfiguration); after...