The following three callback methods are called when one Scene is transitioned into another in Cocos2D.

  1. -(void) onEnter
  2. {
  3. // Called right after a node's init method is called.
  4. // If using a CCTransitionScene: called when the transition begins.
  5. [super onEnter];
  6. }
  7.  
  8. -(void) onEnterTransitionDidFinish
  9. {
  10. // Called right after onEnter.
  11. // If using a CCTransitionScene: called when the transition has ended.
  12. [super onEnterTransitionDidFinish];
  13. }
  14.  
  15. -(void) onExit
  16. {
  17. // Called right before node's dealloc method is called.
  18. // If using a CCTransitionScene: called when the transition has ended.
  19. [super onExit];
  20. }