didEnterBackground in Kobold2d

142 Views Asked by At

In Cocos2d I would implement - (void)applicationDidEnterBackground:(UIApplication *)application inside of the AppDelegate, but in Kobold2d (I haven't worked with it much) that is all handled by config.lua, which is great, but how do I handle these exit/enter/background state changes of the application?

Do I have to to override something, or is there some specific place? I'm not sure what the best practice is here and either I am having a lot of trouble finding a resource online.

Thanks!

1

There are 1 best solutions below

3
On BEST ANSWER

You can simply add these methods to your project's AppDelegate class. AppDelegate derives from KKAppDelegate which implements the UIApplicationDelegate.

Make sure to call [super method] for every method since KKAppDelegate implements basic behavior and relies on receiving some of the UIApplicationDelegate methods.