EbitenViewController.h 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2022 The Ebitengine Authors
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. #import <UIKit/UIKit.h>
  15. @interface {{.PrefixUpper}}EbitenViewController : UIViewController
  16. // onErrorOnGameUpdate is called on the main thread when an error happens when updating a game.
  17. // You can define your own error handler, e.g., using Crashlytics, by overwriting this method.
  18. - (void)onErrorOnGameUpdate:(NSError*)err;
  19. // suspendGame suspends the game.
  20. // It is recommended to call this when the application is being suspended e.g.,
  21. // UIApplicationDelegate's applicationWillResignActive is called.
  22. - (void)suspendGame;
  23. // resumeGame resumes the game.
  24. // It is recommended to call this when the application is being resumed e.g.,
  25. // UIApplicationDelegate's applicationDidBecomeActive is called.
  26. - (void)resumeGame;
  27. @end