找回密碼
 注冊帳號

掃一掃,訪問微社區

audiochorusfilter.isplaying 正播放?

2015-1-3 12:57| 發布者: 楊炎| 查看: 2219| 評論: 0|原作者: 蠻牛|來自: unity3d腳本manual

摘要: audiosource.isplaying 正播放?varisplaying: booldescription描述is theclipplaying right now (read only)?剪輯現在正在播放(只讀)?note:audiosource.isplayingwill return false whenaudiosource.pause() is ...

audiosource.isplaying 正播放?

varisplaying: bool

description描述

is theclipplaying right now (read only)?

剪輯現在正在播放(只讀)?

note:audiosource.isplayingwill return false whenaudiosource.pause() is called. when you useaudiosource.play() again back, it will return true.

注意:當audiosource.pause()被調用,audiosource.isplaying將返回false。當使用audiosource.play()再次播放,將返回true。

c#

javascript

using unityengine;

using system.collections;

public class example :monobehaviour{

publicaudioclipotherclip;

void update() {

if (!audio.isplaying) {

audio.clip = otherclip;

audio.play();

}

}

}

// when the audio component has stopped playing, play otherclip

//當音頻組件被停止播放,播放otherclip

var otherclip :audioclip;

function update (){

if (!audio.isplaying){

audio.clip = otherclip;

audio.play();

}

}

相關閱讀

文章點評
相關文章
女校游泳队彩金