class Scene_Battle
alias main_old main if !method_defined? :main_old
def main
@down_window = Window_Down.new
main_old
@down_window.dispose
end
end
class Scene_Save < Scene_File
alias write_save_data_old write_save_data if
!method_defined? :write_save_data_old
def write_save_data(file)
write_save_data_old(file)
Marshal.dump($a, file)
end
end
class Scene_Load < Scene_File
alias read_save_data_old read_save_data if
!method_defined? :read_save_data_old
def read_save_data(file)
read_save_data_old(file)
$a = Marshal.load(file)
end
def on_decision(filename)
# 文件不存在的情况下
unless FileTest.exist?(filename)
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 演奏读档 SE
$game_system.se_play($data_system.load_se)
# 写入存档数据
file = File.open(filename, "rb")
read_save_data(file)
file.close
# 还原 BGM、BGS
$game_system.bgm_play($game_system.playing_bgm)
$game_system.bgs_play($game_system.playing_bgs)
# 刷新地图 (执行并行事件)
# $a = {}
$game_map.update
# 切换到地图画面
$scene = Scene_Map.new
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |