Reputation: 189
Ok, I have an extremely simple question that hopefully has an extremely simple answer.
I have a class, Handler
, which is a base class for many other subclasses. Handler
needs to add an event listener (addEventListener
). The event listener will be listening for my class, GlobalVars
, to say, "Hey! All the global variables have been set! Come and get them!"
However, I do not know where along the inheritance chain the method addEventListener
is given. I do not want Handler
to subclass a class with many methods like Sprite
, because trying to find my custom functions in all those other functions is really ugly.
What class should I extend to inherit addEventListener
?
Haha, or am I an idiot and have no idea what I'm doing?
Upvotes: 0
Views: 54