mickey
#1
Is there anyway I can execute real time commands through the JS console? Say like i’d like to add a CCSprite or execute some CCAction?
For example on a basic app you have this:
var MyLayer = cc.Layer.extend({
});
If i access MyLayer and try to use the CCLayer’s methods the console will complain.
ShunLin
#2
Of course you can!
After loading the engine, you can try these commands in the console:
var MyLayer = cc.Layer.extend({});
var myLayer = new MyLayer();
myLayer
And the “myLayer” will show you as a class which has all the methods of cc.Layer.