Skip to content

Commit

Permalink
Merge pull request #300 from linshun/iss1234_AlphaVersion
Browse files Browse the repository at this point in the history
Add super init and fixed index note for alpha version
  • Loading branch information
SeanLin committed May 28, 2012
2 parents 4ff0c5c + 6014d90 commit 186a9fa
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
8 changes: 2 additions & 6 deletions Demo/HelloDomMenu/HelloDom.js
Expand Up @@ -60,11 +60,7 @@ var Helloworld = cc.Layer.extend({
var selfPointer = this; var selfPointer = this;
////////////////////////////// //////////////////////////////
// 1. super init first // 1. super init first
/*var test = this._super(); this._super();
cc.LOG(test);
if (!test) {
return false;
}*/


var size = cc.Director.sharedDirector().getWinSize(); var size = cc.Director.sharedDirector().getWinSize();


Expand All @@ -76,7 +72,7 @@ var Helloworld = cc.Layer.extend({


// add "HelloWorld" splash screen" // add "HelloWorld" splash screen"
this.pSprite = cc.Sprite.spriteWithFile("Resources/HelloWorld.png"); this.pSprite = cc.Sprite.spriteWithFile("Resources/HelloWorld.png");
this.pSprite.setPosition(cc.ccp(cc.Director.sharedDirector().getWinSize().width / 2, cc.Director.sharedDirector().getWinSize().height / 2)); this.pSprite.setPosition(cc.ccp(size.width / 2, size.height / 2));
this.pSprite.setIsVisible(true); this.pSprite.setIsVisible(true);
this.pSprite.setAnchorPoint(cc.ccp(0.5, 0.5)); this.pSprite.setAnchorPoint(cc.ccp(0.5, 0.5));
this.pSprite.setScale(0.5); this.pSprite.setScale(0.5);
Expand Down
2 changes: 2 additions & 0 deletions Demo/HelloWorldTutorial/Helloworld.js
Expand Up @@ -55,6 +55,8 @@ var Helloworld = cc.Layer.extend({
var selfPointer = this; var selfPointer = this;
////////////////////////////// //////////////////////////////
// 1. super init first // 1. super init first
this._super();

///////////////////////////// /////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program // 2. add a menu item with "X" image, which is clicked to quit the program
// you may modify it. // you may modify it.
Expand Down
6 changes: 1 addition & 5 deletions Demo/NativeClientDemo/NativeClient.js
Expand Up @@ -139,11 +139,7 @@ var Helloworld = cc.Layer.extend({
var selfPointer = this; var selfPointer = this;
////////////////////////////// //////////////////////////////
// 1. super init first // 1. super init first
var test = this._super(); this._super();
cc.LOG(test);
if (!test) {
return false;
}


///////////////////////////// /////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program // 2. add a menu item with "X" image, which is clicked to quit the program
Expand Down
2 changes: 2 additions & 0 deletions HelloWorld/Helloworld.js
Expand Up @@ -35,6 +35,8 @@ var Helloworld = cc.Layer.extend({


////////////////////////////// //////////////////////////////
// 1. super init first // 1. super init first
this._super();

///////////////////////////// /////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program // 2. add a menu item with "X" image, which is clicked to quit the program
// you may modify it. // you may modify it.
Expand Down
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -59,7 +59,7 @@ <h1><a href="index.html"><img src="tests/Resources/Images/cocos2dbanner.png"/></
<h2>Note</h2> <h2>Note</h2>
<div style = "width:800px"> <div style = "width:800px">
<p>While games written with Cocos2d-html5 should work offline, but some browsers won't allow this to happen. Browsers that deny access to certain functions such as XMLHttpRequest that fails for "file:// " protocol, but Cocos2d-html5 engine depend on this to read many files such as a .plist file.</p> <p>While games written with Cocos2d-html5 should work offline, but some browsers won't allow this to happen. Browsers that deny access to certain functions such as XMLHttpRequest that fails for "file:// " protocol, but Cocos2d-html5 engine depend on this to read many files such as a .plist file.</p>
<p>Firefox 12, and Opera are notable exceptions.</p> <p>Some versions of Firefox, Safari and Opera are notable exceptions.</p>
<p>If you wish to use other browsers, you need a webserver. It doesn't mean a seperate computer, you can download a free webserver program to your computer. Here is some popular webserver program: <p>If you wish to use other browsers, you need a webserver. It doesn't mean a seperate computer, you can download a free webserver program to your computer. Here is some popular webserver program:
<ul><li><a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>: for windows, Mac, Linux</li><li><a href="http://www.wampserver.com/en/">WAMP</a>: for windows</li><li><a href="http://www.mamp.info/en/index.html">MAMP</a>: for Mac</li></ul> <ul><li><a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>: for windows, Mac, Linux</li><li><a href="http://www.wampserver.com/en/">WAMP</a>: for windows</li><li><a href="http://www.mamp.info/en/index.html">MAMP</a>: for Mac</li></ul>
Once you install a webserver, go to your installation directory, there should be a directory called "htdocs" or "www", place Cocos2d-html5 files in there. Then point your browser to http://localhost/.</p> Once you install a webserver, go to your installation directory, there should be a directory called "htdocs" or "www", place Cocos2d-html5 files in there. Then point your browser to http://localhost/.</p>
Expand Down

0 comments on commit 186a9fa

Please sign in to comment.