#===============================================================================
# ■ 开头画面添加logo
#-------------------------------------------------------------------------------
# RGSS3版本
#版本号:1.00
#再次作者:猫尾草
#原作者:Dë;vic
#===============================================================================
module SceneManager
#--------------------------------------------------------------------------
# ● 运行
#--------------------------------------------------------------------------
def self.run
DataManager.init
Audio.setup_midi if use_midi?
@scene = first_scene_class.new
@scene = scend_scene_class.new
@scene.main while @scene
end
def self.first_scene_class
$BTEST ? Scene_Battle : Scene_logo
end
def self.scend_scene_class
$BTEST ? Scene_Battle : Scene_Title
end
end
class Scene_logo
#设定标准值
AudioTypes = %w( BGM BGS ME SE )
def initialize
#图像名字可以自定义,可以自己添加
@img = [ 'logo (1).png', 'logo (2).png' ]
#褪色和淡出效果设置,要输入为true 不要则输入false
@fade = true
#淡出淡入值(帧)【一帧=1/60秒】
@fade_delay = 120
#在屏幕中的等待时间,默认为120帧
@delaying = 10
#音频模块设定,需要的可以在这里修改
@audio =[ 'Applause1.ogg', 100, 100, AudioTypes[9] ]
main
end
#----------------------------------------------------------------------------
# ● 主处理
#----------------------------------------------------------------------------
def main
@img.each{ |i|
@sprite = Sprite.new
@sprite.bitmap = Cache.system(i)
if AudioTypes
case @audio[3]
when 'BGM'
Audio.bgm_play("Audio/BGM/#{@audio[0]}", @audio[1], @audio[2])
when 'BGS'
Audio.bgs_play("Audio/BGS/#{@audio[3]}", @audio[4], @audio[5])
when 'ME'
Audio.me_play("Audio/ME/#{@audio[6]}", @audio[7], @audio[8])
when 'SE'
Audio.se_play("Audio/SE/#{@audio[9]}", @audio[10], @audio[11])
end
end
Graphics.transition
Graphics.fadein(@fade_delay) if @fade == true
Graphics.wait(@delaying)
Graphics.fadeout(@fade_delay) if @fade == true
Graphics.freeze
@sprite.dispose and @sprite.bitmap.dispose
Graphics.freeze
}
end
SceneManager.call(Scene_Title)
end