本帖最后由 taroxd 于 2014-5-24 16:57 编辑
=begin 使用方法:调用事件脚本 change_title1(filename),change_title2(filename) 例:通关前使用 change_title1("cleared") =end TITLE_SAVEFILE = 'SaveSys.rvdata2' class Game_Interpreter def change_title(id, filename) data = load_data(TITLE_SAVEFILE) rescue [] data[id] = filename save_data(data, TITLE_SAVEFILE) end def change_title1(filename) change_title(0, filename) end def change_title2(filename) change_title(1, filename) end end class Scene_Title def create_background title1_name, title2_name = load_data(TITLE_SAVEFILE) rescue [] @sprite1 = Sprite.new @sprite1.bitmap = Cache.title1(title1_name || $data_system.title1_name) @sprite2 = Sprite.new @sprite2.bitmap = Cache.title2(title2_name || $data_system.title2_name) center_sprite(@sprite1) center_sprite(@sprite2) end end
=begin
使用方法:调用事件脚本 change_title1(filename),change_title2(filename)
例:通关前使用 change_title1("cleared")
=end
TITLE_SAVEFILE = 'SaveSys.rvdata2'
class Game_Interpreter
def change_title(id, filename)
data = load_data(TITLE_SAVEFILE) rescue []
data[id] = filename
save_data(data, TITLE_SAVEFILE)
end
def change_title1(filename)
change_title(0, filename)
end
def change_title2(filename)
change_title(1, filename)
end
end
class Scene_Title
def create_background
title1_name, title2_name = load_data(TITLE_SAVEFILE) rescue []
@sprite1 = Sprite.new
@sprite1.bitmap = Cache.title1(title1_name || $data_system.title1_name)
@sprite2 = Sprite.new
@sprite2.bitmap = Cache.title2(title2_name || $data_system.title2_name)
center_sprite(@sprite1)
center_sprite(@sprite2)
end
end
|