Hi,
I created a layer called “BaseLayer” which contains all common buttons and labels. I wanted to extend that BaseLayer to all other layers so that redundant code should b removed. But when i say
childLayer = BaseLayer.extend({
its giving console error “BaseLayer is undefined”. I did it by seeing example in “tests”. but the only difference is childLayer and BaseLayer are written in two different files which i loaded in cocos2d.js.
Then I tried with ought extending, Now i can see all buttons and labels, in child layer but they all are disabled. Image click label updates are not working. I declared all labels as global variables and initialized them in baseLayer init() method. In Child layer when i do setString on labels its giving
label is null;
can anyone reply me asap.