赞 | 4 |
VIP | 9 |
好人卡 | 5 |
积分 | 9 |
经验 | 14928 |
最后登录 | 2018-7-4 |
在线时间 | 421 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 898
- 在线时间
- 421 小时
- 注册时间
- 2015-7-5
- 帖子
- 131
|
- #==============================================================================
- # ■ Scene_Menu
- #------------------------------------------------------------------------------
- # 处理菜单画面的类。
- #==============================================================================
- 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
- create_command_window2 #####################
- @command_window2.visible = false #####################
- @command_window2.active = false #####################
- @gold_window = Window_Gold.new(0, 360)
- @status_window = Window_MenuStatus.new(160, 0)
- @command_window2.x = 544-160 #####################
- @command_window2.z = @status_window.z+1 #####################
- end
- #--------------------------------------------------------------------------
- # ● 结束处理
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_menu_background
- @command_window.dispose
- @gold_window.dispose
- @status_window.dispose
- @command_window2.dispose
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- update_menu_background
- @command_window.update
- @command_window2.update #####################
- @gold_window.update
- @status_window.update
- if @command_window.active
- update_command_selection
- elsif @command_window2.active #####################
- update_command_selection2 #####################
- elsif @status_window.active
- update_actor_selection
- end
- end
- #--------------------------------------------------------------------------
- # ● 生成命令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- s0 = "角色"
- s1 = Vocab::item
- s2 = Vocab::save
- s3 = Vocab::game_end
- @command_window = Window_Command.new(160, [s0,s1, s2, s3])
- @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 create_command_window2
-
- @command_window2 = Window_Command.new(160,["技能","状态","装备"])
- @command_window2.index = 00
- end
- def update_command_selection2
- if Input.trigger?(Input::B)
- Sound.play_cancel
- @status_window.active = true
- @command_window2.active = false
- @command_window2.visible = false
- elsif Input.trigger?(Input::C)
- $game_party.last_actor_index = @status_window.index
- case @command_window2.index
- when 0
- $scene = Scene_Skill.new(@status_window.index)
- when 1
- $scene = Scene_Status.new(@status_window.index)
- when 2
- $scene = Scene_Equip.new(@status_window.index)
- end
- 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 < 4
- 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
- start_actor_selection
- when 1 # 物品
- $scene = Scene_Item.new
- when 2 # 存档
- $scene = Scene_File.new(true, false, false)
- when 3 # 结束游戏
- $scene = Scene_End.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)
- 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)
- #~ end
-
- @command_window2.y = @status_window.index*96+15 #####################
- @command_window2.active = true #####################
- @command_window2.visible = true #####################
- @status_window.active = false #####################
- end
- end
- end
复制代码
参考一下吧,凡是改动的地方都标有###############
并没有太多要改动的。 |
评分
-
查看全部评分
|