Skip to content

add a method to reset the game #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jianglong0156 opened this issue Nov 12, 2014 · 5 comments
Closed

add a method to reset the game #1108

jianglong0156 opened this issue Nov 12, 2014 · 5 comments
Assignees
Milestone

Comments

@jianglong0156
Copy link

add a method to reset the game
we can use it which update the js file, restart game

@pandamicro
Copy link
Contributor

API confirmed:

  1. cleanScript
  2. cc.game.restart

@pandamicro pandamicro added this to the v3.2 milestone Nov 13, 2014
@zhaijialong
Copy link
Contributor

In fact there is already a __restartVM function .

@pandamicro
Copy link
Contributor

Yes, but there is more to do, it's not only about the JS engine, it includes also

  • The C++ environment reinitialization.
  • The clean up of all cached scripts.
  • etc

@zhaijialong
Copy link
Contributor

bu ming jue li, this method exactly does what you said.

jianglong0156 pushed a commit to jianglong0156/cocos2d-js that referenced this issue Nov 14, 2014
jianglong0156 pushed a commit to jianglong0156/cocos2d-js that referenced this issue Nov 14, 2014
jianglong0156 pushed a commit to jianglong0156/cocos2d-js that referenced this issue Nov 14, 2014
jianglong0156 pushed a commit to jianglong0156/cocos2d-js that referenced this issue Nov 20, 2014
jianglong0156 pushed a commit to jianglong0156/cocos2d-js that referenced this issue Nov 20, 2014
jianglong0156 pushed a commit to jianglong0156/cocos2d-js that referenced this issue Nov 20, 2014
jianglong0156 pushed a commit to jianglong0156/cocos2d-js that referenced this issue Nov 24, 2014
jianglong0156 pushed a commit to jianglong0156/cocos2d-js that referenced this issue Nov 24, 2014
pandamicro added a commit to pandamicro/cocos2d-js that referenced this issue Dec 4, 2014
pandamicro added a commit to pandamicro/cocos2d-js that referenced this issue Dec 5, 2014
pandamicro added a commit that referenced this issue Dec 5, 2014
#1108: Add restart game feature and test case
@pandamicro
Copy link
Contributor

Closed via #1169

pandamicro added a commit to pandamicro/cocos2d-html5 that referenced this issue Dec 9, 2014
pandamicro added a commit to cocos2d/cocos2d-html5 that referenced this issue Dec 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants