RPG Maker
 

 Username:
 Password:
   Not a member? Register!

Home > RGSS Script Reference > Scene_Gameover

Scene_Gameover


Inherits from: None

Description: This class handles the Game Over screen.

Code


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

Properties


Sprite: The sprite for the Game Over screen graphic.

Methods


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. 
Syntax
@
@@
$
alias
[array index]
attr_accessor
attr_reader
attr_writer
class
def
do
ensure
for
if
[iterator]
key => value
new
next
nil
redo
require
return
rescue
self
super
undef
unless
until
while
yield

Classes
Arrow_Actor
Arrow_Base
Arrow_Enemy
Game_Actor
Game_Actors
Game_BattleAct
Game_Battler
Game_Character
Game_Common
Game_Enemy
Game_Event
Game_Map
Game_Party
Game_Picture
Game_Player
Game_Screen
Game_SlfSwitch
Game_Switches
Game_System
Game_Troop
Game_Variables
Interpreter
Scene_Debug
Scene_End
Scene_Equip
Scene_File
Scene_Gameover
Scene_Item
Scene_Load
Scene_Map
Scene_Menu
Scene_Name
Scene_Save
Scene_Shop
Scene_Skill
Scene_Status
Scene_Title
Sprite_Battler
Sprite_Character
Sprite_Picture
Sprite_Timer
Spriteset_Battle
Spriteset_Map
Window_Base
Window_Battleresult
Window_Battlestatus
Window_Command
Window_DebugLeft
Window_DebugRight
Window_EquipItem
Window_EquipLeft
Window_EquipRight
Window_Gold
Window_Help
Window_InputNumb
Window_Item
Window_MenuStatus
Window_Message
Window_NameEdit
Window_NameInput
Window_PartyCom
Window_PlayTime
Window_SaveFile
Window_Selectable
Window_ShopBuy
Window_ShopCom
Window_ShopNum
Window_ShopSell
Window_ShopStatus
Window_Skill
Window_SkillStatus
Window_Status
Window_Steps
Window_Target

Other
Class Hierarchy
Global Variables


RPG RPG Revolution
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
eXTReMe Tracker