Created
August 24, 2013 16:48
-
-
Save Seasons7/6329167 to your computer and use it in GitHub Desktop.
JSBSample01 simple hello.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("jsb.js"); | |
try { | |
director = cc.Director.getInstance(); | |
winSize = director.getWinSize(); | |
centerPos = cc.p( winSize.width/2, winSize.height/2 ); | |
var GameLayer = cc.Layer.extend({ | |
// Constructor | |
ctor:function () { | |
this._super(); | |
this.init(); | |
} | |
}); | |
function run() | |
{ | |
var scene = cc.Scene.create(); | |
var layer = new GameLayer(); | |
scene.addChild( layer ); | |
director.runWithScene( scene ); | |
} | |
__jsc__.garbageCollect(); | |
run(); | |
} catch(e) {log(e);} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment