If I had for example a Robot class declared like:
var Robot = cc.Sprite.extend({
CONSTANT: "some constant information",
CONSTANT_OBJECT: {
info: "some constant object for information about the Robot class"
},
ctor: function() {
this._super(arguments);
},
})
and I created 10000 different robots, like
var scene = new cc.Scene();
for (var i = 0; i < 10000; i++) {
scene.addChild(new Robot());
}
My question is: Are the constant variables being replicated 10000 times in memory? or are they just being referenced to the same object. If the first, then how should I declare constants for my classes?
Thank you!