#============================================================================== # ■ Scene_chuzhan #------------------------------------------------------------------------------ # 处理菜单画面的类。 #============================================================================== class Scene_chuzhan #-------------------------------------------------------------------------- # ● 初始化对像 # chuzhan_index : 命令光标的初期位置 #-------------------------------------------------------------------------- def initialize(chuzhan_index = 0) @chuzhan_index = chuzhan_index end #-------------------------------------------------------------------------- # ● 主处理 #-------------------------------------------------------------------------- def main # 生成命令窗口 s1 = "出战1" s2 = "出战2" s3 = "出战3" s4 = "出战4" s5 = "出战5" @command1_window = Window_Chuzhan_Command.new(300, [s1, s2, s3, s4, s5]) @command1_window.index = @chuzhan_index # 禁止存档的情况下 if $game_system.save_disabled # 存档无效 @command1_window.disable_item(4) end # 执行过渡 Graphics.transition # 主循环 loop do # 刷新游戏画面 Graphics.update # 刷新输入信息 Input.update # 刷新画面 update # 如果切换画面就中断循环 if $scene != self break end end # 准备过渡 Graphics.freeze # 释放窗口 @command1_window.dispose end #-------------------------------------------------------------------------- # ● 刷新画面 #-------------------------------------------------------------------------- def update # 刷新窗口 @command1_window.update # 命令窗口被激活的情况下: 调用 update_command if @command1_window.active update_command return end end #-------------------------------------------------------------------------- # ● 刷新画面 (命令窗口被激活的情况下) #-------------------------------------------------------------------------- def update_command # 按下 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 @command1_window.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 $scene = Scene_zhenwei.new 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 $scene = Scene_zhenwei.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 $scene = Scene_zhenwei.new 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 $scene = Scene_zhenwei.new 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 $scene = Scene_zhenwei.new end return end end end
#============================================================================== # ■ Scene_zhenwei #------------------------------------------------------------------------------ # 处理菜单画面的类。 #============================================================================== class Scene_zhenwei #-------------------------------------------------------------------------- # ● 初始化对像 # zhenwei_index : 命令光标的初期位置 #-------------------------------------------------------------------------- def initialize(zhenwei_index = 0) @zhenwei_index = zhenwei_index end #-------------------------------------------------------------------------- # ● 主处理 #-------------------------------------------------------------------------- def main # 生成命令窗口 s1 = "阵位1" s2 = "阵位2" s3 = "阵位3" s4 = "阵位4" s5 = "阵位5" s6 = "阵位6" s7 = "阵位7" s8 = "阵位8" s9 = "阵位9" s10 = "阵位10" @command_window = Window_Zhenwei_Command.new(300, [s1, s2, s3, s4, s5,s6,s7,s8,s9,s10]) @command_window.index = @zhenwei_index # 禁止存档的情况下 if $game_system.save_disabled # 存档无效 @command_window.disable_item(4) end p @chuzhan_index # @command1_window.visible=true # @playtime_window = Window_Chuzhan_Command.new # @playtime_window = Window_PlayTime.new # @playtime_window.x = 0 # @playtime_window.y = 280 # @playtime_window.opacity = 0 # 执行过渡 Graphics.transition # 主循环 loop do # 刷新游戏画面 Graphics.update # 刷新输入信息 Input.update # 刷新画面 update # 如果切换画面就中断循环 if $scene != self break end end # 准备过渡 Graphics.freeze # 释放窗口 @command_window.dispose # @playtime_window.dispose end #-------------------------------------------------------------------------- # ● 刷新画面 #-------------------------------------------------------------------------- def update # 刷新窗口 @command_window.update # @playtime_window.update # 命令窗口被激活的情况下: 调用 update_command if @command_window.active update_command return end # 状态窗口被激活的情况下: 调用 update_status if @status_window.active update_status return end end #-------------------------------------------------------------------------- # ● 刷新画面 (命令窗口被激活的情况下) #-------------------------------------------------------------------------- def update_command # 按下 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 @command_window.index when 0 # 队组1出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) # 切换到物品画面 $出战1=[] if $game_switches[20] = true $出战1=[9.13] end if $game_switches[21] = true $出战2=[9.113] end if $game_switches[20] = true p $出战1 end if $game_switches[21] = true p $出战2 end p @chuzhan_index $scene = Scene_zhenwei.new(1) when 1 # 队组2出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) # 激活状态窗口 $出战2=[] $scene = Scene_zhenwei.new(2) when 2 # 队组3出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) # 激活状态窗口 $出战3=[] $scene = Scene_zhenwei.new(3) when 3 # 队组4出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) $出战4=[] # 激活状态窗口 $scene = Scene_zhenwei.new(4) when 4 # 队组5出生点 # 演奏确定 SE $game_system.se_play($data_system.decision_se) $出战5=[] # 队组4出生点 $scene = Scene_zhenwei.new(5) when 5 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_zhenwei.new(6) when 6 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_zhenwei.new(7) when 7 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_zhenwei.new(8) when 8 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_zhenwei.new(9) when 9 $game_system.se_play($data_system.decision_se) $出战=[] $scene = Scene_zhenwei.new(0) end return end end end
qq634488405 发表于 2024-7-1 11:19
when 0 # 队组1出生点
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |