Commit 9d6c04cd authored by 神楽坂玲奈's avatar 神楽坂玲奈

BGM标题动画纵向

parent 6790eed8
require_relative 'window' require_relative 'window'
class Window_BGM < Window class Window_BGM < Window
WLH=20
def initialize(bgm_name) def initialize(bgm_name)
@bgm_name = bgm_name @bgm_name = bgm_name
@font = TTF.open("fonts/WenQuanYi Micro Hei.ttf", 18) @font = TTF.open("fonts/WenQuanYi Micro Hei.ttf", 18)
width = @font.text_size("♪#{@bgm_name}")[0] width = @font.text_size("♪#{@bgm_name}")[0]
@count = 0 @count = 0
@contents = @font.render_blended_utf8("♪#{@bgm_name}" , 255,255,255) @contents = @font.render_blended_utf8("♪#{@bgm_name}" , 255,255,255)
super($config['screen']['width'], 0, width, 24,999) super($config['screen']['width']-width, -WLH, width, WLH,999)
end end
def update def update
if @count >= 180 if @count >= 180
if @x >= $config['screen']['width'] if @y <= -WLH
self.destroy self.destroy
else else
self.x += 1.5 self.y -= 1
end end
elsif $config['screen']['width'] - @x < @width elsif @y < 0
self.x -= 1.5 self.y += 1
else else
@count += 1 @count += 1
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment