@prev_pos = Audio.bgm_pos #设置变量为当前BGM播放位置 while true #无限循环 if @prev_pos > Audio.bgm_pos && Audio.bgm_pos != 0 #判定播放完毕 Audio.bgm_stop #停止BGM break #脱出循环 end @prev_pos = Audio.bgm_pos if Audio.bgm_pos != 0 #记录BGM位置 Fiber.yield #事件等待1帧 end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |