Project1
标题: 关於ESC 求助..... [打印本页]
作者: 拉羅卡特 时间: 2011-7-11 21:18
标题: 关於ESC 求助.....
本帖最后由 拉羅卡特 于 2011-7-11 21:23 编辑
到底如何用成只有装备 技能 状态 跟离开游戏? 还有一点就是选项名称到底如何修改? 因为选项 特技变成物品 装备变成技能
因为我的物品被我设定搞坏了 所以物品我想踢掉他..... 因为物品点到武器会跳出错误视窗我不会修改.....
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# 这个类用来执行显示ESC选单画面的程式。
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * 物件初始化
# menu_index : 命令游标的起始位置
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * 程式开始
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 360)
@status_window = Window_MenuStatus.new(160, 0)
end
#--------------------------------------------------------------------------
# * 程式中止
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * 更新帧
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * 创建命令视窗
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::skill
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(160, [s2, s3, s4, s5, s6])
@command_window.index = @menu_index
if $game_party.members.size == 0 # 如果无人在队
@command_window.draw_item(0, false) # 禁用[用品]
@command_window.draw_item(1, false) # 禁用[技能]
@command_window.draw_item(2, false) # 禁用[整备]
@command_window.draw_item(3, false) # 禁用[状态]
end
if $game_system.save_disabled # 如果禁止存档
@command_window.draw_item(4, false) # 禁用[存档]
end
end
#--------------------------------------------------------------------------
# * 更新指令选择输入资讯
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 2
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index # 选项位置
when 0 # 物品
$scene = Scene_Item.new
when 1 # 技能
start_actor_selection
when 2 # 存档
$scene = Scene_File.new
end
end
end
#--------------------------------------------------------------------------
# * 开始接收主角选择指令输入资讯
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
#--------------------------------------------------------------------------
# * 停止接收主角选择指令输入资讯
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
#--------------------------------------------------------------------------
# * 更新主角选择指令输入资讯
#--------------------------------------------------------------------------
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1 # 技能
$scene = Scene_Skill.new(@status_window.index)
when 2 # 整备
$scene = Scene_Equip.new(@status_window.index)
when 3 # 状态
$scene = Scene_Status.new(@status_window.index)
when 4 # 物品
$scene = Scene_Result.new(@status_window.index)
end
end
end
end