Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9265885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:11:16+00:00 2026-06-18T14:11:16+00:00

I have created one level in cocos2d and i have a pause button on

  • 0

I have created one level in cocos2d and i have a pause button on screen . clicking on pause screen it will open Menu ( Resume, Restart, Settings) . i want that when i click on restart menu my level will start from start. what i have tried i have remove that layer class and called it again but it didnt work. i tried to replaceScene . it didnt work either. how can i achieve that?
I have tried this and it works.

[[CCDirector sharedDirector] resume];
    [[CCDirector sharedDirector] pushScene:[HelloWorldLayer node]];

But is it write that i am calling pushScene over and over.? will it effect my game. coz till now i am now removing that HelloWorldLayer that i want to restart again.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:11:17+00:00Added an answer on June 18, 2026 at 2:11 pm

    You have to use replaceScene. With pushScene the app will eventually run out of memory as previous scenes are not deallocating.

    Be sure to create a new scene (as in your code sample), do not try to call replaceScene with the already running scene, that will fail.

    You should also verify that your scene deallocates after replaceScene. Set a breakpoint in the dealloc method. If it does not deallocate, this means the scene is leaking and that can lead to all kinds of strange issues.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a very beginner in html/css. I have created a one level dropdown menu
I have created a menu , with 3 tiers. The problem occurs after clicking
I have created a simple reprot with one level of XML data, and followed
I have created one javascript file(.js) for Language Settings. So how can I get
I have created one service in my grails application. in that service 25 methods
I have created one UIImageView Here's code capView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:kARROW_CAP_NAME]]; capView.frame
I have created one library project in iphone and my images folder is present
i have created one image but problem is that when i save image from
I have created one class as public class FormActivity extends Activity { TextView tv
I have created one multiplication of complex function using prototype in java-script function ComplexNumber(real,imaginary)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.