Class: Gosu::AndroidInitializer

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/gosu_android/main-window.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#activityObject (readonly)

Returns the value of attribute activity.



19
20
21
# File 'lib/gosu_android/main-window.rb', line 19

def activity
  @activity
end

#graphicsObject (readonly)

Returns the value of attribute graphics.



18
19
20
# File 'lib/gosu_android/main-window.rb', line 18

def graphics
  @graphics
end

#surface_viewObject (readonly)

Returns the value of attribute surface_view.



18
19
20
# File 'lib/gosu_android/main-window.rb', line 18

def surface_view
  @surface_view
end

Instance Method Details

#on_readyObject



31
32
33
# File 'lib/gosu_android/main-window.rb', line 31

def on_ready
  @activity.on_ready
end

#start(activity) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/gosu_android/main-window.rb', line 21

def start activity
  activity.toast 'Still loading please wait'
  @activity = activity
  @surface_view = GosuSurfaceView.new(@activity)
  @graphics = Graphics.new(self)
  @surface_view.renderer =  @graphics
  @activity.content_view = @surface_view
  activity.toast 'Still loading please wait'
end