I am planning to use cocos2d-x with javascript language.
var MyGameLayer = cc.Layer.extend({
this.start = false;
});
MyGameLayer.prototype.initialize = function() {
this.start = true;
}
********************
countdown.js - (my own class - not extending any cocos)
var MyCountDown = function() {
}
Can i write my own functions like this?
Do i need to stick with any particular notation?
Can i get any sample to where i can learn the best practice for cocos-javascript?
With “Sonar systems” video tutorials, i have learnt a lot of cocos functionality.
But i don’t know how to use them cleverly without repeating in many places.