赞 | 0 |
VIP | 0 |
好人卡 | 14 |
积分 | 1 |
经验 | 11195 |
最后登录 | 2017-6-7 |
在线时间 | 543 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 543 小时
- 注册时间
- 2009-7-13
- 帖子
- 63
|
read_save_data是Scene_File的方法……楼上那样不行的- def command_continue
- if @continue_enabled
- Sound.play_decision
- #$scene = Scene_File.new(false, true, false)
- file = File.open("Save1.rvdata", "rb")
- characters = Marshal.load(file)
- Graphics.frame_count = Marshal.load(file)
- @last_bgm = Marshal.load(file)
- @last_bgs = Marshal.load(file)
- $game_system = Marshal.load(file)
- $game_message = Marshal.load(file)
- $game_switches = Marshal.load(file)
- $game_variables = Marshal.load(file)
- $game_self_switches = Marshal.load(file)
- $game_actors = Marshal.load(file)
- $game_party = Marshal.load(file)
- $game_troop = Marshal.load(file)
- $game_map = Marshal.load(file)
- $game_player = Marshal.load(file)
- if $game_system.version_id != $data_system.version_id
- $game_map.setup($game_map.map_id)
- $game_player.center($game_player.x, $game_player.y)
- end
- $scene = Scene_Map.new
- RPG::BGM.fade(1500)
- Graphics.fadeout(60)
- Graphics.wait(40)
- @last_bgm.play
- @last_bgs.play
- else
- Sound.play_buzzer
- end
- end
复制代码 不过要保证Save1.rvdata存在,不然会报错。
最好把Scene_Title里的check_continue这个方法也改掉- def check_continue
- @continue_enabled = (Dir.glob('Save1.rvdata').size == 1)
- end
复制代码 |
|