#encoding:utf-8
#==============================================================================
# ■ Scene_Title
#------------------------------------------------------------------------------
# 标题画面
#==============================================================================
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# ● 生成背景
#--------------------------------------------------------------------------
def create_background
@sprite1 = Sprite.new
@sprite1.x = 130
@sprite1.y = 88
@sprite1.bitmap = Bitmap.new("t")
@sprite2 = Sprite.new
@sprite2.bitmap = Cache.title2($data_system.title2_name)
center_sprite(@sprite2)
#--------------------------------------------------------------------------
#*基本示例 一行即生效
#--------------------------------------------------------------------------
Unravel_Bitmap.new(130,88,@sprite1.bitmap,0,0,279,125,150,4,0.5,:RU,:C,false)
#--------------------------------------------------------------------------
end
#--------------------------------------------------------------------------
# ● 绘制游戏标题
#--------------------------------------------------------------------------
def draw_game_title
@a = rand(2)
end
#--------------------------------------------------------------------------
#*循环示例
#--------------------------------------------------------------------------
@@t = 0
@@e = [:LU,:RU,:LD,:RD]
def update
super
@@t+=1
if @@t == 15
@@t = 0
if @a == 0
#四周扩散 且关闭清除效果
Unravel_Bitmap.new(130,88,@sprite1.bitmap,0,0,279,125,8,4,0.5,@@e[rand(4)],:C,false)
else
#默认
Unravel_Bitmap.new(130,88,@sprite1.bitmap,0,0,279,125,8,4)
end
end
end
#--------------------------------------------------------------------------
# ● 指令“开始游戏”
#--------------------------------------------------------------------------
def command_new_game
#--------------------------------------------------------------------------
#*按键示例
#--------------------------------------------------------------------------
Unravel_Bitmap.new(130,88,@sprite1.bitmap,0,0,279,125,-1,4,0.5,:LRUD,:S)
@sprite1.opacity = 0
close_command_window
180.times {Graphics.update}
#--------------------------------------------------------------------------
DataManager.setup_new_game
close_command_window
fadeout_all
$game_map.autoplay
SceneManager.goto(Scene_Map)
end
#--------------------------------------------------------------------------
# ● 指令“继续游戏”
#--------------------------------------------------------------------------
def command_continue
#--------------------------------------------------------------------------
#*按键示例
#--------------------------------------------------------------------------
Unravel_Bitmap.new(130,88,@sprite1.bitmap,0,0,279,125,-1,4,0.5,:LRUD,:S)
@sprite1.opacity = 0
close_command_window
180.times {Graphics.update}
#--------------------------------------------------------------------------
close_command_window
SceneManager.call(Scene_Load)
end
#--------------------------------------------------------------------------
# ● 指令“退出游戏”
#--------------------------------------------------------------------------
def command_shutdown
#--------------------------------------------------------------------------
#*按键示例
#--------------------------------------------------------------------------
Unravel_Bitmap.new(130,88,@sprite1.bitmap,0,0,279,125,-1,4,0.5,:LRUD,:S)
@sprite1.opacity = 0
close_command_window
180.times {Graphics.update}
#--------------------------------------------------------------------------
close_command_window
fadeout_all
SceneManager.exit
end
#--------------------------------------------------------------------------
# ● 播放标题画面音乐
#--------------------------------------------------------------------------
def play_title_music
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end
end