I'm trying to display a pause game layer from applicationDidEnterBackground: method and calls this method for some reason But nothing happens.
Representative
- (zero) applicationDidderbackground: (UIApplication *) application {ship = [[Ship Alok] init]; [Ship stops]; Stop method
- Stop (zero) {BOOL is paused = [[CCDCD share director] has been blocked); If (IsPaused) {// Game Stop ccColor4B c = {100,100,0,100}; PauseLayer * pauseLayer = [[[Pozzeller Elok] Init Whistler: C] AutoCare]; [Self. Left menu item set enabled: no]; [Self. Right Manuitem set enabled: no]; [Self refreshable set is enabled: no]; [Self-composite: Pausherer z: 10 tags: 100]; [[CCCCeter Shareholder Paus]; }} Pauslayer
+ (ID) view {CCScen * View = [CCScene node]; Pozzarer * Layer = [Pozzlare node]; [Add View Build: Layer]; Return view; } - (id) initWithColor: (ccColor4B) color {if ((self = [super initWithColor: color])) {self.isTouchEnabled = Yes; [CCMenuItemFont setFontName: @ "Marker imposed"]; [CCMenuItemFont setFontSize: 40]; CCMenuItemFont * resumeGameItem = [CCMenuItemFont itemFromString: @ "Resume" Goal: Self Selector: @Selector (Resume Game)]; CCMenuItemFont * menuGameItem = [CCMenuItemFont itemFromString: @ "Menu" Goal: Self Selector: @Selector (goToGameMenu)]; Ccmenu * menu = [ccmenu menuEightmates: resumeGam item, menuGynamite, zero]; [Menu alignItemsVerticallyWithPadding: 40.00]; [Self composite: menu]; } Healthy return; } Thanks!
If you are a representative, it is not added to any cacos layer which I can see. You will need to get the context of the current scenario and add the vessel to it (ship possession is the sub-square of Cocos node).
Comments
Post a Comment