Class: MG::Director
- Inherits:
-
Object
- Object
- MG::Director
- Defined in:
- doc/API_reference.rb
Overview
Director is a shared object that takes care of the scene graph.
Instance Attribute Summary collapse
-
#content_scale_factor ⇒ Float
The scale factor of content for multi-resolution.
-
#glview ⇒ GLView
readonly
A GLView instance.
-
#origin ⇒ Point
readonly
The visible origin of the director view in points.
-
#size ⇒ Size
readonly
The visible size of the director view in points.
Constructors collapse
-
.shared ⇒ Director
The shared Director instance.
Managing Scenes collapse
-
#end ⇒ self
Ends the execution of the running scene.
-
#pause ⇒ self
Pauses the execution of the running scene.
-
#pop ⇒ self
Pops the running scene from the stack, and starts running the previous scene.
-
#push(scene) ⇒ self
Suspends the execution of the running scene, and starts running the given scene instead.
-
#replace(scene) ⇒ self
Replaces the current scene with a new one.
-
#resume ⇒ self
Resumes the execution of the current paused scene.
-
#run(scene) ⇒ self
Runs the given scene object.
-
#start_animation ⇒ self
The main loop is triggered again.
-
#stop_animation ⇒ self
Stops the animation.
Instance Method Summary collapse
-
#show_stats=(value) ⇒ Object
Controls whether the FPS (frame-per-second) statistic label is displayed in the bottom-left corner of the director view.
-
#show_stats? ⇒ Boolean
Controls whether the FPS (frame-per-second) statistic label is displayed in the bottom-left corner of the director view.
Instance Attribute Details
#content_scale_factor ⇒ Float
Returns the scale factor of content for multi-resolution.
500 501 502 |
# File 'doc/API_reference.rb', line 500 def content_scale_factor @content_scale_factor end |
#glview ⇒ GLView (readonly)
Returns a GLView instance.
503 504 505 |
# File 'doc/API_reference.rb', line 503 def glview @glview end |
#origin ⇒ Point (readonly)
Returns the visible origin of the director view in points.
484 485 486 |
# File 'doc/API_reference.rb', line 484 def origin @origin end |
#size ⇒ Size (readonly)
Returns the visible size of the director view in points.
487 488 489 |
# File 'doc/API_reference.rb', line 487 def size @size end |
Class Method Details
.shared ⇒ Director
Returns the shared Director instance.
433 |
# File 'doc/API_reference.rb', line 433 def self.shared; end |
Instance Method Details
#end ⇒ self
Ends the execution of the running scene.
462 |
# File 'doc/API_reference.rb', line 462 def end; end |
#pause ⇒ self
Pauses the execution of the running scene.
466 |
# File 'doc/API_reference.rb', line 466 def pause; end |
#pop ⇒ self
Pops the running scene from the stack, and starts running the previous scene. If there are no more scenes to run, the execution will be stopped.
458 |
# File 'doc/API_reference.rb', line 458 def pop; end |
#push(scene) ⇒ self
Suspends the execution of the running scene, and starts running the given scene instead.
453 |
# File 'doc/API_reference.rb', line 453 def push(scene); end |
#replace(scene) ⇒ self
Replaces the current scene with a new one. The running scene will be terminated.
447 |
# File 'doc/API_reference.rb', line 447 def replace(scene); end |
#resume ⇒ self
Resumes the execution of the current paused scene.
470 |
# File 'doc/API_reference.rb', line 470 def resume; end |
#run(scene) ⇒ self
Runs the given scene object.
441 |
# File 'doc/API_reference.rb', line 441 def run(scene); end |
#show_stats=(value) ⇒ Object
Controls whether the FPS (frame-per-second) statistic label is displayed in the bottom-left corner of the director view. By default it is hidden.
492 |
# File 'doc/API_reference.rb', line 492 def show_stats=(value); end |
#show_stats? ⇒ Boolean
Controls whether the FPS (frame-per-second) statistic label is displayed in the bottom-left corner of the director view. By default it is hidden.
497 |
# File 'doc/API_reference.rb', line 497 def show_stats?; end |
#start_animation ⇒ self
The main loop is triggered again.
474 |
# File 'doc/API_reference.rb', line 474 def start_animation; end |
#stop_animation ⇒ self
Stops the animation.
478 |
# File 'doc/API_reference.rb', line 478 def stop_animation; end |