Class: Scene_Base
- Inherits:
-
Object
- Object
- Scene_Base
- Defined in:
- lib/rgss3_default_scripts/Scene_Base.rb
Overview
** Scene_Base
This is a super class of all scenes within the game.
Direct Known Subclasses
Scene_Battle, Scene_Gameover, Scene_Map, Scene_MenuBase, Scene_Title
Instance Method Summary collapse
-
#check_gameover ⇒ Object
————————————————————————– * Determine if Game Is Over Transition to the game over screen if the entire party is dead.
-
#create_main_viewport ⇒ Object
————————————————————————– * Create Viewport ————————————————————————–.
-
#dispose_all_windows ⇒ Object
————————————————————————– * Free All Windows ————————————————————————–.
-
#dispose_main_viewport ⇒ Object
————————————————————————– * Free Viewport ————————————————————————–.
-
#fadeout_all(time = 1000) ⇒ Object
————————————————————————– * Fade Out All Sounds and Graphics ————————————————————————–.
-
#main ⇒ Object
————————————————————————– * Main ————————————————————————–.
-
#perform_transition ⇒ Object
————————————————————————– * Execute Transition ————————————————————————–.
-
#post_start ⇒ Object
————————————————————————– * Post-Start Processing ————————————————————————–.
-
#pre_terminate ⇒ Object
————————————————————————– * Pre-Termination Processing ————————————————————————–.
-
#return_scene ⇒ Object
————————————————————————– * Return to Calling Scene ————————————————————————–.
-
#scene_changing? ⇒ Boolean
————————————————————————– * Determine if Scene Is Changing ————————————————————————–.
-
#start ⇒ Object
————————————————————————– * Start Processing ————————————————————————–.
-
#terminate ⇒ Object
————————————————————————– * Termination Processing ————————————————————————–.
-
#transition_speed ⇒ Object
————————————————————————– * Get Transition Speed ————————————————————————–.
-
#update ⇒ Object
————————————————————————– * Frame Update ————————————————————————–.
-
#update_all_windows ⇒ Object
————————————————————————– * Update All Windows ————————————————————————–.
-
#update_basic ⇒ Object
————————————————————————– * Update Frame (Basic) ————————————————————————–.
Instance Method Details
#check_gameover ⇒ Object
-
Determine if Game Is Over Transition to the game over screen if the entire party is dead.
129 130 131 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 129 def check_gameover SceneManager.goto(Scene_Gameover) if $game_party.all_dead? end |
#create_main_viewport ⇒ Object
-
Create Viewport
79 80 81 82 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 79 def @viewport = Viewport.new @viewport.z = 200 end |
#dispose_all_windows ⇒ Object
-
Free All Windows
101 102 103 104 105 106 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 101 def dispose_all_windows instance_variables.each do |varname| ivar = instance_variable_get(varname) ivar.dispose if ivar.is_a?(Window) end end |
#dispose_main_viewport ⇒ Object
-
Free Viewport
86 87 88 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 86 def @viewport.dispose end |
#fadeout_all(time = 1000) ⇒ Object
-
Fade Out All Sounds and Graphics
116 117 118 119 120 121 122 123 124 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 116 def fadeout_all(time = 1000) RPG::BGM.fade(time) RPG::BGS.fade(time) RPG::ME.fade(time) Graphics.fadeout(time * Graphics.frame_rate / 1000) RPG::BGM.stop RPG::BGS.stop RPG::ME.stop end |
#main ⇒ Object
-
Main
11 12 13 14 15 16 17 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 11 def main start post_start update until scene_changing? pre_terminate terminate end |
#perform_transition ⇒ Object
-
Execute Transition
67 68 69 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 67 def perform_transition Graphics.transition(transition_speed) end |
#post_start ⇒ Object
-
Post-Start Processing
27 28 29 30 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 27 def post_start perform_transition Input.update end |
#pre_terminate ⇒ Object
-
Pre-Termination Processing
54 55 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 54 def pre_terminate end |
#return_scene ⇒ Object
-
Return to Calling Scene
110 111 112 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 110 def return_scene SceneManager.return end |
#scene_changing? ⇒ Boolean
-
Determine if Scene Is Changing
34 35 36 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 34 def scene_changing? SceneManager.scene != self end |
#start ⇒ Object
-
Start Processing
21 22 23 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 21 def start end |
#terminate ⇒ Object
-
Termination Processing
59 60 61 62 63 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 59 def terminate Graphics.freeze dispose_all_windows end |
#transition_speed ⇒ Object
-
Get Transition Speed
73 74 75 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 73 def transition_speed return 10 end |
#update ⇒ Object
-
Frame Update
40 41 42 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 40 def update update_basic end |
#update_all_windows ⇒ Object
-
Update All Windows
92 93 94 95 96 97 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 92 def update_all_windows instance_variables.each do |varname| ivar = instance_variable_get(varname) ivar.update if ivar.is_a?(Window) end end |
#update_basic ⇒ Object
-
Update Frame (Basic)
46 47 48 49 50 |
# File 'lib/rgss3_default_scripts/Scene_Base.rb', line 46 def update_basic Graphics.update Input.update update_all_windows end |