Is it possible to call methods in a sibling node?

I have a layer with two sub layers, one of which deals with touch input, etc and the other holds a CCLabel and some functionality to set the label text. Is there a way to have the input layer call the label layer with information the label layer can use to update the label?

I've tried using Parent (CCNode), but when I try to run that on the Android (my primary testing environment currently), the program loads but stops working as soon as I try to use Parent.XXXX or this.Parent.XXXX. I still only get the one error (with the useless EGL_BAD_??? error), so I'm not sure how to tell what's going wrong.

var parentName = Parent.GetName();
var parentName = this.Parent.GetName();

I even tried using a pointer variable, but that didn't work either.

Is there a way to refer to a sibling Node?

Sign In or Register to comment.