赞 | 23 |
VIP | 207 |
好人卡 | 31 |
积分 | 31 |
经验 | 48797 |
最后登录 | 2024-11-30 |
在线时间 | 1535 小时 |
Lv3.寻梦者 孤独守望
- 梦石
- 0
- 星屑
- 3137
- 在线时间
- 1535 小时
- 注册时间
- 2006-10-16
- 帖子
- 4321
|
为什么我看这个脚本像是我上次写的End版本……好吧,我试试,进度条那个有点难=v=
还有菜刀你好懒=v=
- class Window_Enjoy < Window_Base
- def initialize
- super(640 - 224,480 - 152,224,152)
- self.contents = Bitmap.new(width - 32,height - 32)
- end
- def update(ar)
- refresh(ar)
- end
- def refresh(ar)
- self.contents.clear
- self.contents.draw_text(0,32*0,192,32,ar[0])
- self.contents.draw_text(0,32*1,192,32,"出处: " + ar[1])
- self.contents.draw_text(0,32*2,192,32,"制作人:" + ar[2])
- self.contents.draw_text(0,32*3,192,32,"词作者:" + ar[3])
- end
- end
- class Scene_Music
- #--------------------------------------------------------------------------
- # ● 主处理
- #--------------------------------------------------------------------------
- def main
- # 生成命令窗口
- s1 = "music1"
- s2 = "music2"
- s3 = "music3"
- s4 = "music4"
- @command_window = Window_Command.new(192, [s1, s2, s3,s4])
- @command_window.x = 0
- @command_window.y = 0
- @musicname = ["001-Battle01","002-Battle02","003-Battle03","004-Battle04"]
- @enjoys = [["music1","From","Maker","Words Maker"],
- ["music2","From","Maker","Words Maker"],
- ["music3","From","Maker","Words Maker"],
- ["music4","From","Maker","Words Maker"]]
- @enjoy_window = Window_Enjoy.new
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @command_window.dispose
- if $scene.is_a?(Scene_Title)
- Graphics.transition
- Graphics.freeze
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- @enjoy_window.update(@enjoys[@command_window.index])
- @command_window.update
- # 按下 B 键的情况下
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- $scene = Scene_Title.new
- return
- end
- # 按下 C 键的场合下
- if Input.trigger?(Input::C)
- # 命令窗口光标位置分支
- name = "Audio/BGM/" + @musicname[@command_window.index]
- Audio.bgm_play(name)
- return
- end
- end
- end
复制代码
第一个功能实现了,进度条实在找不到计算音乐总长度的方法,饶了我吧=v= 系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~ |
|