赞 | 31 |
VIP | 146 |
好人卡 | 11 |
积分 | 38 |
经验 | 143619 |
最后登录 | 2024-4-25 |
在线时间 | 1966 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3841
- 在线时间
- 1966 小时
- 注册时间
- 2013-1-3
- 帖子
- 9536
|
本帖最后由 紫英晓狼1130 于 2018-6-18 20:33 编辑
改Scene就可以了
我以Scene_Status为例简单改了一下
传不了附件和图片…真次…
- #==============================================================================
- # ■ Scene_Status
- #------------------------------------------------------------------------------
- # 处理状态画面的类。
- #==============================================================================
- class Scene_Status
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # actor_index : 角色索引
- #--------------------------------------------------------------------------
- def initialize(actor_index = 0, equip_index = 0)
- @actor_index = actor_index
- end
- #--------------------------------------------------------------------------
- # ● 主处理
- #--------------------------------------------------------------------------
- def main
- # ★
- @pic = Sprite.new
- @pic.bitmap = Bitmap.new("Graphics/System/1.png")
- @pic.x = 0
- @pic.y = 0
- @pic.z = 200
- @pic.src_rect.set(0,0,@pic.bitmap.width/4,@pic.bitmap.height)
- @a = 1
- # 获取角色
- @actor = $game_party.actors[@actor_index]
- # 生成状态窗口
- @status_window = Window_Status.new(@actor)
- # 执行过渡
- Graphics.transition
- # 主循环
- loop do
- # 刷新游戏画面
- Graphics.update
- # 刷新输入信息
- Input.update
- # 刷新画面
- update
- # 如果画面被切换的话就中断循环
- if $scene != self
- break
- end
- end
- # 准备过渡
- Graphics.freeze
- # 释放窗口
- @status_window.dispose
- @pic.dispose
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- # ★ 四帧
- @a += 1
- @a %= 40
- @pic.src_rect.set(@a/10*@pic.bitmap.width/4,0,@pic.bitmap.width/4,@pic.bitmap.height)
- # 按下 B 键的情况下
- if Input.trigger?(Input::B)
- # 演奏取消 SE
- $game_system.se_play($data_system.cancel_se)
- # 切换到菜单画面
- $scene = Scene_Menu.new(3)
- return
- end
- # 按下 R 键的情况下
- if Input.trigger?(Input::R)
- # 演奏光标 SE
- $game_system.se_play($data_system.cursor_se)
- # 移至下一位角色
- @actor_index += 1
- @actor_index %= $game_party.actors.size
- # 切换到别的状态画面
- $scene = Scene_Status.new(@actor_index)
- return
- end
- # 按下 L 键的情况下
- if Input.trigger?(Input::L)
- # 演奏光标 SE
- $game_system.se_play($data_system.cursor_se)
- # 移至上一位角色
- @actor_index += $game_party.actors.size - 1
- @actor_index %= $game_party.actors.size
- # 切换到别的状态画面
- $scene = Scene_Status.new(@actor_index)
- return
- end
- end
- end
复制代码
|
|