Class: MG::Director
- Inherits:
-
Object
- Object
- MG::Director
- Defined in:
- motion-game
Overview
Director is a shared object that takes care of the scene graph.
Properties (collapse)
-
- (Point) origin
readonly
The visible origin of the director view in points.
-
- (Boolean) show_stats?
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)
-
+ (Director) shared
The shared Director instance.
Managing Scenes (collapse)
-
- (Director) end
Ends the execution of the running scene.
-
- (Director) pause
Pauses the execution of the running scene.
-
- (Director) pop
Pops the running scene from the stack, and starts running the previous scene.
-
- (Director) push(scene)
Suspends the execution of the running scene, and starts running the given scene instead.
-
- (Director) replace(scene)
Replaces the current scene with a new one.
-
- (Director) resume
Resumes the execution of the current paused scene.
-
- (Director) run(scene)
Runs the given scene object.
Instance Attribute Details
- (Point) origin (readonly)
Returns the visible origin of the director view in points.
130 131 132 |
# File 'motion-game', line 130 def origin @origin end |
- (Boolean) show_stats?
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.
138 139 140 |
# File 'motion-game', line 138
def show_stats?
@show_stats?
end
|
- (Size) size (readonly)
Returns the visible size of the director view in points.
133 134 135 |
# File 'motion-game', line 133 def size @size end |
Class Method Details
+ (Director) shared
Returns the shared Director instance.
87 |
# File 'motion-game', line 87 def self.shared; end |
Instance Method Details
- (Director) end
Ends the execution of the running scene.
116 |
# File 'motion-game', line 116 def end; end |
- (Director) pause
Pauses the execution of the running scene.
120 |
# File 'motion-game', line 120 def pause; end |
- (Director) pop
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.
112 |
# File 'motion-game', line 112 def pop; end |
- (Director) push(scene)
Suspends the execution of the running scene, and starts running the given scene instead.
107 |
# File 'motion-game', line 107 def push(scene); end |
- (Director) replace(scene)
Replaces the current scene with a new one. The running scene will be terminated.
101 |
# File 'motion-game', line 101 def replace(scene); end |
- (Director) resume
Resumes the execution of the current paused scene.
124 |
# File 'motion-game', line 124 def resume; end |
- (Director) run(scene)
Runs the given scene object.
95 |
# File 'motion-game', line 95 def run(scene); end |