赞 | 1 |
VIP | 0 |
好人卡 | 85 |
积分 | 1 |
经验 | 41098 |
最后登录 | 2015-3-17 |
在线时间 | 1071 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 1071 小时
- 注册时间
- 2011-5-12
- 帖子
- 2317
|
阁下确定你的脚本是这样吗?- #==============================================================================
- # ■ Scene_ShowSkill
- #------------------------------------------------------------------------------
- # 显示技能画面的类。
- #==============================================================================
- class Scene_ShowSkill < Scene_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor_index : 角色位置
- #--------------------------------------------------------------------------
- def initialize(actor_index = 0, equip_index = 0)
- @actor_index = actor_index
- end
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- create_menu_background
- @actor = $game_party.members[@actor_index]
- @viewport = Viewport.new(0, 0, 544, 416)
- @help_window = Window_Help.new
- @help_window.viewport = @viewport
- @status_window = Window_SkillStatus.new(0, 56, @actor)
- @status_window.viewport = @viewport
- @skill_window = Window_Skill.new(0, 112, 544, 304, @actor)
- @skill_window.viewport = @viewport
- @skill_window.help_window = @help_window
- end
- #--------------------------------------------------------------------------
- # ● 结束处理
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_menu_background
- @help_window.dispose
- @status_window.dispose
- @skill_window.dispose
- end
- #--------------------------------------------------------------------------
- # ● 回到原画面
- #--------------------------------------------------------------------------
- def return_scene
- $scene = Scene_Menu.new(1)
- end
- #--------------------------------------------------------------------------
- # ● 切换至下一角色画面
- #--------------------------------------------------------------------------
- def next_actor
- @actor_index += 1
- @actor_index %= $game_party.members.size
- $scene = Scene_Skill.new(@actor_index)
- end
- #--------------------------------------------------------------------------
- # ● 切换至上一角色画面
- #--------------------------------------------------------------------------
- def prev_actor
- @actor_index += $game_party.members.size - 1
- @actor_index %= $game_party.members.size
- $scene = Scene_Skill.new(@actor_index)
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- update_menu_background
- @help_window.update
- @status_window.update
- @skill_window.update
- if @skill_window.active
- update_skill_selection
- elsif @target_window.active
- update_target_selection
- end
- end
- #--------------------------------------------------------------------------
- # ● 更新技能选择
- #--------------------------------------------------------------------------
- def update_skill_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- return_scene
- elsif Input.trigger?(Input::R)
- Sound.play_cursor
- next_actor
- elsif Input.trigger?(Input::L)
- Sound.play_cursor
- prev_actor
- end
- end
- end
复制代码 |
|