Property | Type | Description | |
---|---|---|---|
clips | AudioClip[] | ||
musicClips | AudioClip>.Dictionary | ||
playersForClipId | List |
||
soundState | int |
Method | Description | |
---|---|---|
CanPlayBackSound ( ) : bool |
是否播放背景音乐,默认是1:播放
|
|
CanPlaySoundEffect ( ) : bool |
是否播放音效,默认是1:播放
|
|
Init ( ) : IEnumerator | ||
LoadAudioClip ( string path ) : AudioClip |
载入一个音频
|
|
LoadSoundSync ( string path, int id ) : void | ||
Off ( ) : void | ||
On ( ) : void | ||
Play ( AudioClip clip, Vector3 position ) : void |
播放音频剪辑
|
|
PlayBacksound ( string name, bool canPlay ) : void |
播放背景音乐
|
|
PlayClipAsync ( int id, bool loop = false ) : void | ||
PlayClipSync ( int id ) : void | ||
PlayMusic ( string name, bool loop = true ) : void | ||
PreloadClip ( string bundleName, string soundName, int id ) : void |
异步加载太慢了
|
|
PreloadMusic ( string bundleName, string musicName ) : void | ||
ProcessMsg ( QMsg msg ) : void |
覆盖掉上一级的消息转发
|
|
StopClip ( int id ) : void | ||
StopMusic ( ) : void | ||
StopSound ( int id ) : void |
停止所有音效
|
|
UnloadAudioClip ( string path ) : void |
Method | Description | |
---|---|---|
QSoundMgr ( ) : UnityEngine | ||
SetupMgrId ( ) : void |
Method | Description | |
---|---|---|
Add ( string key, |
添加一个声音
|
|
Awake ( ) : void |
创建音效播放器和音乐播放器
|
|
Get ( string key ) : AudioClip |
获取一个声音
|
|
OnDestroy ( ) : void | ||
Start ( ) : void |
public LoadAudioClip ( string path ) : AudioClip | ||
path | string | |
return | AudioClip |
public LoadSoundSync ( string path, int id ) : void | ||
path | string | |
id | int | |
return | void |
public Play ( AudioClip clip, Vector3 position ) : void | ||
clip | AudioClip | |
position | Vector3 | |
return | void |
public PlayBacksound ( string name, bool canPlay ) : void | ||
name | string | |
canPlay | bool | |
return | void |
public PlayClipAsync ( int id, bool loop = false ) : void | ||
id | int | |
loop | bool | |
return | void |
public PlayMusic ( string name, bool loop = true ) : void | ||
name | string | |
loop | bool | |
return | void |
public PreloadClip ( string bundleName, string soundName, int id ) : void | ||
bundleName | string | |
soundName | string | |
id | int | Identifier. |
return | void |
public PreloadMusic ( string bundleName, string musicName ) : void | ||
bundleName | string | |
musicName | string | |
return | void |
public UnloadAudioClip ( string path ) : void | ||
path | string | |
return | void |