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

BGM标题动画纵向

parent 6790eed8
require_relative 'window'
class Window_BGM < Window
WLH=20
def initialize(bgm_name)
@bgm_name = bgm_name
@font = TTF.open("fonts/WenQuanYi Micro Hei.ttf", 18)
width = @font.text_size("♪#{@bgm_name}")[0]
@count = 0
@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
def update
if @count >= 180
if @x >= $config['screen']['width']
if @y <= -WLH
self.destroy
else
self.x += 1.5
self.y -= 1
end
elsif $config['screen']['width'] - @x < @width
self.x -= 1.5
elsif @y < 0
self.y += 1
else
@count += 1
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