加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
鼠标点窗口右上角x时,不关闭窗口,弹出 Scene_End 菜单。
# 使用鼠标点击窗口右上角x 关闭窗口时,弹出选择框。 module Kernel def exit(*args) $scene = Scene_End.new end end class Scene_End < Scene_Base # 重写“取消键”的功能 def return_scene if $game_temp.in_battle # 取消操作后返回战斗场景 $scene = Scene_Battle.new elsif $game_party.members.size == 0 $scene = Scene_Title.new # 取消操作后返回标题界面 else $scene = Scene_Map.new # 取消操作后返回地图场景 end end # 战斗场景“返回标题”时,先释放战斗场景相关元素 def command_to_title if $game_temp.in_battle $game_party.clear_actions $game_party.remove_states_battle $game_troop.clear $game_temp.battle_proc = nil $game_temp.in_battle = false $game_temp.next_scene = nil Sound.play_decision RPG::BGM.fade(800) RPG::BGS.fade(800) RPG::ME.fade(800) $scene = Scene_Title.new close_command_window Graphics.fadeout(60) else Sound.play_decision RPG::BGM.fade(800) RPG::BGS.fade(800) RPG::ME.fade(800) $scene = Scene_Title.new close_command_window Graphics.fadeout(60) end end end class Scene_File < Scene_Base # 读取存档界面 - 按“取消键” 返回时 def return_scene if @from_title || $game_party.members.size == 0 $scene = Scene_Title.new # 返回标题界面 elsif @from_event if $game_temp.in_battle # 返回战斗场景 $scene = Scene_Battle.new else $scene = Scene_Map.new # 返回地图场景 end else $scene = Scene_Menu.new(4) # 返回菜单场景 end end # 战斗场景读档时,先释放战斗场景相关元素 def do_load file = File.open(@savefile_windows[@index].filename, "rb") read_save_data(file) file.close if $game_temp.in_battle $game_party.clear_actions $game_party.remove_states_battle $game_troop.clear $game_temp.battle_proc = nil $game_temp.in_battle = false $game_temp.next_scene = nil $scene = Scene_Map.new RPG::BGM.fade(1500) Graphics.fadeout(60) Graphics.wait(40) @last_bgm.play @last_bgs.play else $scene = Scene_Map.new RPG::BGM.fade(1500) Graphics.fadeout(60) Graphics.wait(40) @last_bgm.play @last_bgs.play end end end
# 使用鼠标点击窗口右上角x 关闭窗口时,弹出选择框。
module Kernel
def exit(*args)
$scene = Scene_End.new
end
end
class Scene_End < Scene_Base
# 重写“取消键”的功能
def return_scene
if $game_temp.in_battle # 取消操作后返回战斗场景
$scene = Scene_Battle.new
elsif $game_party.members.size == 0
$scene = Scene_Title.new # 取消操作后返回标题界面
else
$scene = Scene_Map.new # 取消操作后返回地图场景
end
end
# 战斗场景“返回标题”时,先释放战斗场景相关元素
def command_to_title
if $game_temp.in_battle
$game_party.clear_actions
$game_party.remove_states_battle
$game_troop.clear
$game_temp.battle_proc = nil
$game_temp.in_battle = false
$game_temp.next_scene = nil
Sound.play_decision
RPG::BGM.fade(800)
RPG::BGS.fade(800)
RPG::ME.fade(800)
$scene = Scene_Title.new
close_command_window
Graphics.fadeout(60)
else
Sound.play_decision
RPG::BGM.fade(800)
RPG::BGS.fade(800)
RPG::ME.fade(800)
$scene = Scene_Title.new
close_command_window
Graphics.fadeout(60)
end
end
end
class Scene_File < Scene_Base
# 读取存档界面 - 按“取消键” 返回时
def return_scene
if @from_title || $game_party.members.size == 0
$scene = Scene_Title.new # 返回标题界面
elsif @from_event
if $game_temp.in_battle # 返回战斗场景
$scene = Scene_Battle.new
else
$scene = Scene_Map.new # 返回地图场景
end
else
$scene = Scene_Menu.new(4) # 返回菜单场景
end
end
# 战斗场景读档时,先释放战斗场景相关元素
def do_load
file = File.open(@savefile_windows[@index].filename, "rb")
read_save_data(file)
file.close
if $game_temp.in_battle
$game_party.clear_actions
$game_party.remove_states_battle
$game_troop.clear
$game_temp.battle_proc = nil
$game_temp.in_battle = false
$game_temp.next_scene = nil
$scene = Scene_Map.new
RPG::BGM.fade(1500)
Graphics.fadeout(60)
Graphics.wait(40)
@last_bgm.play
@last_bgs.play
else
$scene = Scene_Map.new
RPG::BGM.fade(1500)
Graphics.fadeout(60)
Graphics.wait(40)
@last_bgm.play
@last_bgs.play
end
end
end
|