| 赞 | 72 |
| VIP | |
| 好人卡 | |
| 积分 | 23 |
| 经验 | |
| 最后登录 | 2022-3-9 |
| 在线时间 | 4033 小时 |
…あたしは天
- 梦石
- 0
- 星屑
- 2308
- 在线时间
- 4033 小时
- 注册时间
- 2010-10-4
- 回帖
- 10548
 
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 taroxd 于 2014-9-21 07:28 编辑
快速存/读档 S键为存,L键为读。需要全键盘脚本
[pre lang="ruby" line="1"]
#--------------------------------------------------------------------------
# ● require Taroxd基础设置,全键盘控制
# 快速存档读档
#--------------------------------------------------------------------------
module Taroxd::QuickSL
KEY_SAVE = Keyboard::S # 存档键
KEY_LOAD = Keyboard::L # 读档键
#--------------------------------------------------------------------------
# ● 存档位置
#--------------------------------------------------------------------------
def quick_save_index
0
end
#--------------------------------------------------------------------------
# ● 快速存档
#--------------------------------------------------------------------------
def quick_save
if DataManager.save_game(quick_save_index)
on_quick_save_success
else
Sound.play_buzzer
end
end
#--------------------------------------------------------------------------
# ● 快速读档
#--------------------------------------------------------------------------
def quick_load
if DataManager.load_game(quick_save_index)
on_quick_load_success
else
Sound.play_buzzer
end
end
#--------------------------------------------------------------------------
# ● 快速存档成功时的处理
#--------------------------------------------------------------------------
def on_quick_save_success
Sound.play_save
end
#--------------------------------------------------------------------------
# ● 快速读档成功时的处理
#--------------------------------------------------------------------------
def on_quick_load_success
Sound.play_load
SceneManager.scene.fadeout_all
$game_system.on_after_load
SceneManager.goto(Scene_Map)
end
#--------------------------------------------------------------------------
# ● 监听快速存档键的按下
#--------------------------------------------------------------------------
def update_call_quick_save
quick_save if !$game_system.save_disabled && Keyboard.trigger?(KEY_SAVE)
end
#--------------------------------------------------------------------------
# ● 监听快速读档键的按下
#--------------------------------------------------------------------------
def update_call_quick_load
quick_load if Keyboard.trigger?(KEY_LOAD)
end
#--------------------------------------------------------------------------
# ● 监听快速存/读档键的按下
#--------------------------------------------------------------------------
def update_call_quickSL
update_call_quick_save
update_call_quick_load
end
end
class Scene_Map < Scene_Base
include Taroxd::QuickSL
#--------------------------------------------------------------------------
# ● 场景更新
#--------------------------------------------------------------------------
def_after(:update_scene) { update_call_quickSL unless scene_changing? }
end
class Scene_Title < Scene_Base
include Taroxd::QuickSL
#--------------------------------------------------------------------------
# ● 场景更新
#--------------------------------------------------------------------------
def_after(:update) { update_call_quick_load unless scene_changing? }
end
class Game_Interpreter
include Taroxd::QuickSL
end
[/pre] |
|