1 decade ago by MikeL
I am working on abstracting out my game flow control out of main.js and into it's own class - GameController. I have encountered a problem, whereby I want to call the parent function of the update method of MyGame, but from a method within the GameController class. Is this possible?
I tried:
and
but I get a variation on this error:
I tried:
ig.game.update.parent();
and
var update = ig.game.update; update.parent();
but I get a variation on this error:
Uncaught TypeError: Object function () {
var tmp = this.parent;
this.parent = parent[name];
var ret = fn.apply(this, arguments);
this.parent = tmp;
return ret;
} has no method 'parent'