|
|
 |
|
|
|
Home > RGSS Script Reference > Scene_Gameover
Scene_Gameover
Inherits from: None
Description: This class handles the Game Over screen.
class Scene_Gameover
# ------------------------------------
def main
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name)
$game_system.bgm_play(nil)
$game_system.bgs_play(nil)
$game_system.me_play($data_system.gameover_me)
Graphics.transition(120)
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@sprite.bitmap.dispose
@sprite.dispose
Graphics.transition(40)
Graphics.freeze
if $BTEST
$scene = nil
end
end
# ------------------------------------
def update
if Input.trigger?(Input::C)
$scene = Scene_Title.new
end
end
end
|
Sprite: The sprite for the Game Over screen graphic.
Main
Arguments: None
Local Variables: None
How it Works: This is the main method for this class. The first part of the method sets up the picture that will be displayed. Then, the BGM and BGS are stopped, and the Game Over ME is played. The main loop is the loop you see in most "Scene" classes. It updates the graphics, checks for input, and updates the window contents repeatedly until the value of $Scene changes (the user has pressed "C" to return to the title screen). Once the scene changes, the rest of the method disposes of the bitmap.
Update
Arguments: None
Local Variables: None
How it Works: This method checks to see if the user has pressed "C" (decision key). If the player has, then the scene is changed to the title screen.
|
|
|
|
RPG RPG Revolution is your #1 stop for game development and console RPG games, as well as those created by people like you. Link to us to support us, so we may grow to be better website community for you.
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the Terms of Use.
©2004 - 2008 RPG RPG Revolution, All Rights Reserved. Contact Us · Privacy Policy · Legal Disclaimer
|
|
|
|