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.
Properties collapse
-
#origin ⇒ Point
readonly
The visible origin of the director view in points.
-
#show_stats? ⇒ Boolean
Controls whether the FPS (frame-per-second) statistic label is displayed in the bottom-left corner of the director view.
-
#size ⇒ Size
readonly
The visible size of the director view in points.
Constructors collapse
-
.shared ⇒ Director
The shared Director instance.
Managing Scenes collapse
-
#end ⇒ Director
Ends the execution of the running scene.
-
#pause ⇒ Director
Pauses the execution of the running scene.
-
#pop ⇒ Director
Pops the running scene from the stack, and starts running the previous scene.
-
#push(scene) ⇒ Director
Suspends the execution of the running scene, and starts running the given scene instead.
-
#replace(scene) ⇒ Director
Replaces the current scene with a new one.
-
#resume ⇒ Director
Resumes the execution of the current paused scene.
-
#run(scene) ⇒ Director
Runs the given scene object.
-
#start_animation ⇒ Director
The main loop is triggered again.
-
#stop_animation ⇒ Director
Stops the animation.
Instance Attribute Details
#origin ⇒ Point (readonly)
Returns the visible origin of the director view in points.
490 491 492 |
# File 'doc/API_reference.rb', line 490 def origin @origin 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.
498 499 500 |
# File 'doc/API_reference.rb', line 498
def show_stats?
@show_stats?
end
|
#size ⇒ Size (readonly)
Returns the visible size of the director view in points.
493 494 495 |
# File 'doc/API_reference.rb', line 493 def size @size end |
Class Method Details
.shared ⇒ Director
Returns the shared Director instance.
439 |
# File 'doc/API_reference.rb', line 439 def self.shared; end |
Instance Method Details
#end ⇒ Director
Ends the execution of the running scene.
468 |
# File 'doc/API_reference.rb', line 468 def end; end |
#pause ⇒ Director
Pauses the execution of the running scene.
472 |
# File 'doc/API_reference.rb', line 472 def pause; end |
#pop ⇒ Director
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.
464 |
# File 'doc/API_reference.rb', line 464 def pop; end |
#push(scene) ⇒ Director
Suspends the execution of the running scene, and starts running the given scene instead.
459 |
# File 'doc/API_reference.rb', line 459 def push(scene); end |
#replace(scene) ⇒ Director
Replaces the current scene with a new one. The running scene will be terminated.
453 |
# File 'doc/API_reference.rb', line 453 def replace(scene); end |
#resume ⇒ Director
Resumes the execution of the current paused scene.
476 |
# File 'doc/API_reference.rb', line 476 def resume; end |
#run(scene) ⇒ Director
Runs the given scene object.
447 |
# File 'doc/API_reference.rb', line 447 def run(scene); end |
#start_animation ⇒ Director
The main loop is triggered again.
480 |
# File 'doc/API_reference.rb', line 480 def start_animation; end |
#stop_animation ⇒ Director
Stops the animation.
484 |
# File 'doc/API_reference.rb', line 484 def stop_animation; end |