不是很明白你的需求……动画是要在哪里播放,最简单的实现方式还是每隔几帧显示一张图片,然后等图片显示完再还原BGM
比如你这个范例就改706行附近的代码
if Input.trigger?(Input::C) if @yes_no_window.index == 0 #===================================================== $game_system.bgm_memorize Audio.bgm_play("Audio/BGM/XXXXXXX" ,100, 100) #XXXXX是你想要播放的BGM名称 sprite=Sprite.new sprite.x = 220 sprite.y = 140 sprite.z = 99999 for i in 1...n #N是你要连续播放的图片数量,为了播放动画 sprite.bitmap = RPG::Cache.picture("a ("+i.to_s+").png") #图片的命名格式为“a (n)”,n=1,2,3,4,5,6........ 3.times{Graphics.update} sprite.update end sprite.dispose $game_system.bgm_restore #===================================================== $game_system.se_play($data_system.decision_se) @recipe.make $game_system.se_play($data_system.save_se) $scene=Scene_Craft.new(@craft_type,@craft_index) else $game_system.se_play($data_system.cancel_se) $scene=Scene_Craft.new(@craft_type,@craft_index) end end
if Input.trigger?(Input::C)
if @yes_no_window.index == 0
#=====================================================
$game_system.bgm_memorize
Audio.bgm_play("Audio/BGM/XXXXXXX" ,100, 100) #XXXXX是你想要播放的BGM名称
sprite=Sprite.new
sprite.x = 220
sprite.y = 140
sprite.z = 99999
for i in 1...n #N是你要连续播放的图片数量,为了播放动画
sprite.bitmap = RPG::Cache.picture("a ("+i.to_s+").png") #图片的命名格式为“a (n)”,n=1,2,3,4,5,6........
3.times{Graphics.update}
sprite.update
end
sprite.dispose
$game_system.bgm_restore
#=====================================================
$game_system.se_play($data_system.decision_se)
@recipe.make
$game_system.se_play($data_system.save_se)
$scene=Scene_Craft.new(@craft_type,@craft_index)
else
$game_system.se_play($data_system.cancel_se)
$scene=Scene_Craft.new(@craft_type,@craft_index)
end
end
顺便传了个范例工程 |