赞 | 5 |
VIP | 71 |
好人卡 | 22 |
积分 | 6 |
经验 | 32145 |
最后登录 | 2013-8-9 |
在线时间 | 184 小时 |
Lv2.观梦者 天仙
- 梦石
- 0
- 星屑
- 620
- 在线时间
- 184 小时
- 注册时间
- 2008-4-15
- 帖子
- 5023
|
已经有个雏形
因为改的比较多
先把这个给你看一下
- #==============================================================================
- # ** Scene_Menu
- #------------------------------------------------------------------------------
- # This class performs the menu screen processing.
- #==============================================================================
- 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
-
- @actor_index = 0
- @actor = $game_party.members[@actor_index]
-
- @gold_window = Window_Gold.new(0, 360)
- @status_window = Window_Status.new(@actor)
-
- #@time_window = Window_PlayTime.new
-
- @help_window = Window_Help.new
- @help_window.visible = false
- @help_window.x = 0
- @help_window.y = 360
-
- @item_window = Window_Item.new(160, 176, 384, 184)
- @item_window.index = -1
- @item_window.visible = false
-
- @skill_window = Window_Skill.new(0, 112, 544, 304, @actor)
- @skill_window.index = -1
- @skill_window.visible = false
-
- @equip_window = Window_Equip.new(208, 56, @actor)
- @equip_window.index = -1
- @equip_window.y = 176
- @equip_window.height += 32
- @equip_window.visible = false
-
- @equip_status_window = Window_EquipStatus.new(0, 56, @actor)
- @equip_status_window.y = 176
- @equip_status_window.height += 32
- @equip_status_window.visible = false
- end
- #--------------------------------------------------------------------------
- # 执行结束
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_menu_background
- @command_window.dispose
- @gold_window.dispose
- @status_window.dispose
- #@time_window.dispose
- @help_window.dispose
- @item_window.dispose
- @skill_window.dispose
- @equip_window.dispose
- @equip_status_window.dispose
- end
- #--------------------------------------------------------------------------
- # 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- update_menu_background
- @command_window.update
- @gold_window.update
- @status_window.update
- #@time_window.update
- @help_window.update
- @item_window.update
- @skill_window.update
- @equip_window.update
- @equip_status_window.update
-
- @actor = $game_party.members[@actor_index]
-
- if @command_window.active
- update_command_selection
- end
- end
- #--------------------------------------------------------------------------
- # * Create Command Window
- #--------------------------------------------------------------------------
- def create_command_window
- s1 = Vocab::item
- s2 = Vocab::skill
- s3 = Vocab::equip
- s4 = "任务"
- s5 = Vocab::save
- s6 = Vocab::game_end
- @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
- @command_window.index = @menu_index
- if $game_party.members.size == 0 # If number of party members is 0
- @command_window.draw_item(0, false) # Disable item
- @command_window.draw_item(1, false) # Disable skill
- @command_window.draw_item(2, false) # Disable equipment
- end
- if $game_system.save_disabled # If save is forbidden
- @command_window.draw_item(4, false) # Disable save
- 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
- if @command_window.index < 3
- @help_window.visible = true
- @gold_window.visible = false
- @time_window.visible = false
- @command_window.active = false
- else
- @help_window.visible = false
- @gold_window.visible = true
- @time_window.visible = true
- @command_window.active = false
- end
- case @command_window.index
- when 0 # 物品
- @item_window.help_window = @help_window
- @item_window.visible = true
- when 1 # 技能
- @skill_window.help_window = @help_window
- @skill_window.visible = true
- when 2 # 装备
- @equip_window.help_window = @help_window
- @equip_window.visible = true
- @equip_status_window.visible = true
- when 3
- #$scene = Scene_Task.new(3)
- when 4 # 存档
- $scene = Scene_File.new(true, false, false)
- when 5 # 结束
- $scene = Scene_End.new
- end
- end
- prev_actor if Input.trigger?(Input::LEFT)
- next_actor if Input.trigger?(Input::RIGHT)
- end
- def return_scene
- $scene = Scene_Menu.new(3)
- end
- #--------------------------------------------------------------------------
- # 切换到下一个角色
- #--------------------------------------------------------------------------
- def next_actor
- Sound.play_cursor
- @actor_index += 1
- @actor_index %= $game_party.members.size
- @status_window.dispose
- @status_window = Window_Status.new(@actor)
- end
- #--------------------------------------------------------------------------
- # 切换到上一个角色
- #--------------------------------------------------------------------------
- def prev_actor
- Sound.play_cursor
- @actor_index += $game_party.members.size - 1
- @actor_index %= $game_party.members.size
- @status_window.dispose
- @status_window = Window_Status.new(@actor)
- end
- end
复制代码 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|