Sha256: cd97e71b1d2cbabfb02f5ff9551af3183a024fb2891823dcecef3e1377307933

Contents?: true

Size: 980 Bytes

Versions: 12

Compression:

Stored size: 980 Bytes

Contents

class AppDelegate
  def application(application, didFinishLaunchingWithOptions:launchOptions)
    @app = Application.new # important to initialize the engine

    @window = UIWindow.alloc.initWithFrame(UIScreen.mainScreen.bounds)

    rootViewController = RootViewController.alloc.init
    rootViewController.wantsFullScreenLayout = true
    glview = CCEAGLView.viewWithFrame(@window.bounds)
    rootViewController.view = glview

    @window.rootViewController = rootViewController
    @window.makeKeyAndVisible

    MG::Director.shared._set_glview(glview)
    MG::Application.shared.run

    true
  end

  def applicationWillEnterForeground(application)
    director = MG::Director.shared
    director.resume
    director.start_animation
    @app.resume if @app.respond_to?(:resume)
  end

  def applicationWillResignActive(application)
    director = MG::Director.shared
    director.pause
    director.stop_animation
    @app.send(:pause) if @app.respond_to?(:pause)
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
motion-game-1.1.14 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.13 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.12 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.11 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.10 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.9 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.8.1 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.8 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.7.2 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.7.1 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.7 lib/motion-game/ios/app_delegate.rb
motion-game-1.1.6 lib/motion-game/ios/app_delegate.rb