audiosource 音频源

2015-1-3 12:37| 发布者: 杨炎| 查看: 1896| 评论: 0|原作者: 蛮牛|来自: yzc88亚洲城脚本manual

摘要: audiosource 音频源inherits frombehavioura representation of audio sources in 3d.表示在3d空间中的音频源。an audiosource is attached to agameobjectfor playing back sounds in a 3d environment. mono sound ...

audiosource 音频

inherits frombehaviour

a representation of audio sources in 3d.

表示在3d空间中的音频源。

an audiosource is attached to agameobjectfor playing back sounds in a 3d environment. mono sounds play back 3d. in order to play 3d sounds you also need to have aaudiolistener. the audio listener is normally attached to the camera you want to use. stereo sounds are always played back without distance based attenuation.

audiosource附加到一个gameobject用于在3d环境中播放声音。单声道声音以3d播放。为了播放3d声音,也需要有一个audiolistener。音频监听器通常附加在使用的相机上。立体声总是不以距离为基础衰减。

you can play a single audio clip usingplay,pauseandstop. you can also adjust its volume while playing usingtime. multiple sounds can be played on one audiosource usingplayoneshot. you can play a clip at a static position in 3d space usingplayclipatpoint.

你可以使用play,pause,stop来播放音频剪辑。也可以在播放时使用time来定位。多个声音可以使用playoneshot在一个audiosource上播放。可以使用playclipatpoint在3d空间中的一个静态位置播放剪辑。

参见:audiolistener,audioclip

variables变量

volume

the volume of the audio source.

音频源的音量。

pitch

the pitch of the audio source.

音频源的音调。

time

playback position in seconds.

以秒为单位的播放位置。

timesamples

playback position in pcm samples.

在pcm取样的播放位置。

clip

the default audioclip to play

默认播放的音频剪辑。

isplaying

is the clip playing right now (read only)?

剪辑现在正在播放(只读)?

loop

is the audio clip looping?

音频剪辑循环播放?

ignorelistenervolume

this makes the audio source not take into account the volume of the audio listener.

这使音频源不考虑音频监听器的音量。

playonawake

if set to true, the audio source will automatically start playing on awake

如果设置为true,音频源将在awake时自动播放。

velocityupdatemode

whether the audio source should be updated in the fixed or dynamic update.

audiosource是否应该以固定或动态的方式更新?

panlevel

sets how much the 3d engine has an effect on the channel.

设置多少,3d引擎在通道上有效果。

bypasseffects

bypass effects (applied from filter components or global listener filters)

直通效果(从过滤器组件或全局监听过滤器应用)。

dopplerlevel

sets the doppler scale for this audiosource

设置这个audiosource的多普勒缩放。

spread

sets the spread angle a 3d stereo or multichannel sound in speaker space.

设置3d stereo的扩散角或扬声器空间的多声道声音。

priority

sets the priority of the audiosource

设置audiosource的优先权。

mute

un- / mutes the audiosource. mute sets the volume=0, un-mute restore the original volume.

是否静音音频源。mute是设置音量为0,取消静音是恢复原来的音量。

mindistance

within the min distance the audiosource will cease to grow louder in volume.

在最小距离内,audiosource将停止增大音量。

maxdistance

(logarithmic rolloff) maxdistance is the distance a sound stops attenuating at.

(对数衰减)最大距离是一个声音停止衰减的距离。

pan

sets a channels pan position linearly. only works for 2d clips.

设置一个通道平衡调整线性位置,只工作于2d剪辑。

rolloffmode

sets/gets how the audiosource attenuates over distance

设置/获取audiosource随着距离衰减。

functions函数

play

plays the clip.

播放剪辑。

stop

stops playing the clip.

停止播放该剪辑。

pause

pauses playing the clip.

暂停播放该剪辑。

playoneshot

plays an audioclip.

播放一个音频剪辑。

getoutputdata

returns a block of the currently playing source's output data

返回一个当前播放源的输出数据块。

getspectrumdata

returns a block of the currently playing source's spectrum data

返回当前播放源的声谱数据块。

class functions类函数

playclipatpoint

plays the clip at position. automatically cleans up the audio source after it has finished playing.

在指定位置播放剪辑。播放完成后自动消除音频源。

inherited members继承成员

inherited variables继承变量

enabled

enabled behaviours are updated, disabled behaviours are not.

启用行为被更新,禁用行为不更新。

transform

thetransformattached to thisgameobject(null if there is none attached).

transform附加到gameobject(游戏物体)(如无附加则为空)。

rigidbody

therigidbodyattached to thisgameobject(null if there is none attached).

rigidbody附加到gameobject(游戏物体)(如无附加则为空)。

camera

thecameraattached to thisgameobject(null if there is none attached).

camera附加到gameobject(游戏物体)(如无附加则为空)。

light

thelightattached to thisgameobject(null if there is none attached).

light附加到gameobject(游戏物体)(如无附加则为空)。

animation

theanimationattached to thisgameobject(null if there is none attached).

animation附加到gameobject(游戏物体)(如无附加则为空)。

constantforce

theconstantforceattached to thisgameobject(null if there is none attached).

constantforce附加到gameobject(游戏物体)(如无附加则为空)。

renderer

therendererattached to thisgameobject(null if there is none attached).

renderer附加到gameobject(游戏物体)(如无附加则为空)。

audio

theaudiosourceattached to thisgameobject(null if there is none attached).

audiosource附加到gameobject(游戏物体)(如无附加则为空)。

guitext

theguitextattached to thisgameobject(null if there is none attached).

guitext附加到gameobject(游戏物体)(如无附加则为空)。

networkview

thenetworkviewattached to thisgameobject(read only). (null if there is none attached)

networkview附加到gameobject(游戏物体)(只读)(如无附加则为空)。

guitexture

theguitextureattached to thisgameobject(read only). (null if there is none attached)

guitexture附加到gameobject(游戏物体)(只读)(如无附加则为空)。

collider

thecolliderattached to thisgameobject(null if there is none attached).

collider附加到gameobject(游戏物体)(如无附加则为空)。

hingejoint

thehingejointattached to thisgameobject(null if there is none attached).

hingejoint附加到gameobject(游戏物体)(如无附加则为空)。

particleemitter

theparticleemitterattached to thisgameobject(null if there is none attached).

particleemitter附加到gameobject(游戏物体)(如无附加则为空)。

gameobject

the game object this component is attached to. a component is always attached to a game object.

组件附加的游戏物体。一个组件总是被附加到一个游戏物体。

tag

the tag of this game object.

游戏物体的标签。

name

the name of the object. //物体的名字

hideflags

should the object be hidden, saved with the scene or modifiable by the user?

物体是否被隐藏、保存在场景中或被用户修改?

相关阅读

文章点评
相关文章