#---------------------------------------
# ● 设定部分
#---------------------------------------
module Vocab
# 设定游戏结束画面选项“返回标题”的名称
BackTitle = "回到标题"
# 设定游戏结束画面选项“退出游戏”的名称
QuitGame = "结束游戏"
end
#---------------------------------------
# ● 脚本部分
#---------------------------------------
#-----------------
# Scene_Gameover
#-----------------
class Scene_Gameover < Scene_Base
def start
super
RPG::BGM.stop
RPG::BGS.stop
$data_system.gameover_me.play
Graphics.transition(120)
Graphics.freeze
create_gameover_graphic
create_command_window
end
def post_start
super
open_command_window
end
def pre_terminate
super
close_command_window
end
def terminate
super
dispose_gameover_graphic
$scene = nil if $BTEST
end
def update
super
@command_window.update
if Input.trigger?(Input::C)
case @command_window.index
when 0
$scene = Scene_Title.new
Graphics.fadeout(120)
when 1
exit
end
end
end
def create_command_window
s1 = Vocab::BackTitle
s2 = Vocab::QuitGame
@command_window = Window_Command.new(172, [s1, s2])
@command_window.opacity=0
@command_window.x = 272
@command_window.y = 298
@command_window.openness = 0
end
def dispose_command_window
@command_window.dispose
end
def open_command_window
@command_window.open
begin
@command_window.update
Graphics.update
end until @command_window.openness == 255
end
def close_command_window
@command_window.close
begin
@command_window.update
Graphics.update
end until @command_window.openness == 0
end
def perform_transition
Graphics.transition(180)
end
end[/pre]