Instead of creating an anonymous method (gotoGameOverScene), create the method "Class:onTransitionEnd", and set "onEnd = self" in the transition creation.