#============================================================================== # ■ Scene_chuzhan #------------------------------------------------------------------------------ # 处理菜单画面的类。 #============================================================================== class Scene_chuzhan #-------------------------------------------------------------------------- # ● 初始化对像 # chuzhan_index : 命令光标的初期位置 #-------------------------------------------------------------------------- def initialize(chuzhan_index = 0,zhenwei_index = 0) @chuzhan_index = chuzhan_index @zhenwei_index = zhenwei_index @wait_time = 0 end #-------------------------------------------------------------------------- # ● 主处理 #-------------------------------------------------------------------------- def main # 生成地图背景 @chezhan_TransparentBackground = Spriteset_Map.new # 生成出战菜单选项 @chezhan_IndexCommand = Window_chuzhanCommand.new @chezhan_IndexCommand.index = @chuzhan_index # 生成阵位列表 @zhenwei_IndexCommand = Window_zhenweiCommand.new @zhenwei_IndexCommand.index = @zhenwei_index # 冻结 Graphics.transition # 不切换场景就一直循环 update while $scene == self # 渐变 Graphics.freeze @chezhan_IndexCommand.dispose @zhenwei_IndexCommand.dispose end #-------------------------------------------------------------------------- # ● 刷新画面 #-------------------------------------------------------------------------- def update Graphics.update Input.update @wait_time -= 1 # if @chezhan_IndexCommand.active == true @chezhan_IndexCommand.update # end update_chezhan_IndexCommand # if @chezhan_IndexCommand.active == false # @zhenwei_IndexCommand.update # update_zhenwei_IndexCommand # end # return zhenweiUpdate_IndexCommand if@chezhan_IndexCommand.active # return zhenweiUpdate_IndexCommand if @zhenwei_IndexCommand.active =nil end #-------------------------------------------------------------------------- # ● 刷新画面 (命令窗口被激活的情况下) #-------------------------------------------------------------------------- def update_chezhan_IndexCommand # @chezhan_IndexCommand.update # 按下 B 键的情况下 if Input.trigger?(Input::B) $scene = Scene_Map.new return end # 按下 C 键的情况下 if Input.trigger?(Input::C) # 命令窗口的光标位置分支 case @chezhan_IndexCommand.index when 0 # 队组1出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) # 切换到物品画面 # $game_switches[队伍1] = true #/ false $game_switches[20] = true $game_switches[21] = false $game_switches[22] = false $game_switches[23] = false $game_switches[24] = false @chezhan_IndexCommand.active = false @zhenwei_IndexCommand.active = true @zhenwei_IndexCommand.update update_zhenwei_IndexCommand # $scene = Scene_chuzhan.new(5) when 1 # 队组2出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) # 激活状态窗口 $game_switches[20] = false $game_switches[21] = true $game_switches[22] = false $game_switches[23] = false $game_switches[24] = false @chezhan_IndexCommand.active = false @zhenwei_IndexCommand.active = true # $scene = Scene_chuzhan.new when 2 # 队组3出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) # 激活状态窗口 $game_switches[20] = false $game_switches[21] = false $game_switches[22] = true $game_switches[23] = false $game_switches[24] = false @chezhan_IndexCommand.active = false @zhenwei_IndexCommand.active = true when 3 # 队组4出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) $game_switches[20] = false $game_switches[21] = false $game_switches[22] = false $game_switches[23] = true $game_switches[24] = false @chezhan_IndexCommand.active = false @zhenwei_IndexCommand.active = true when 4 # 队组5出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) $game_switches[20] = false $game_switches[21] = false $game_switches[22] = false $game_switches[23] = false $game_switches[24] = true @chezhan_IndexCommand.active = false @zhenwei_IndexCommand.active = true end return end end #-------------------------------------------------------------------------- # ● 刷新画面 (命令窗口被激活的情况下) #-------------------------------------------------------------------------- def update_zhenwei_IndexCommand # 按下 B 键的情况下 if Input.trigger?(Input::B) # 演奏取消 SE $game_system.se_play($data_system.cancel_se) # 切换的地图画面 $scene = Scene_Map.new return end # 按下 C 键的情况下 if Input.trigger?(Input::C) # 命令窗口的光标位置分支 case @zhenwei_IndexCommand.index when 0 # 队组1出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) # 切换到物品画面 # $出战1=[] if $game_switches[20] == true $出战1=[9.13] p $出战1 end if $game_switches[21] == true $出战2=[9.113] p $出战2 end # $scene = Scene_chuzhan.new(1) when 1 # 队组2出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) # 激活状态窗口 $出战2=[] $scene = Scene_chuzhan.new(2) when 2 # 队组3出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) # 激活状态窗口 $出战3=[] $scene = Scene_chuzhan.new(3) when 3 # 队组4出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) $出战4=[] # 激活状态窗口 $scene = Scene_chuzhan.new(4) when 4 # 队组5出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) $出战5=[] # 队组4出生点 $scene = Scene_chuzhan.new(5) when 5 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_chuzhan.new(6) when 6 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_chuzhan.new(7) when 7 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_chuzhan.new(8) when 8 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_chuzhan.new(9) when 9 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_chuzhan.new(0) end return end end end
选项阵位.png (127.72 KB, 下载次数: 6)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |