I have an object setup like the following:
var StartScreenLayer = cc.Layer.extend({
ctor: function () {
this._super();
// this function can call createBackground!
this.createBackground();
},
callCreateBackgroundToo: function () {
// I can call createBackground too!
this.createBackground();
},
createBackground: function () {
});
How do I arrange it so that createBackground is private but other other objects cannot call something like screenLayer.createBackground()
and throw a createBackground is undefined
type error on the object?