Class: group
Class: group
audio_.group
音频组
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new group(init_
, priority_n_
)
Parameters
Name | Type |
---|---|
init_ | audio |
priority_n_ | number |
Defined in
assets/@framework/audio/mk_audio_base.ts:534
Properties
priority_n
• Readonly
priority_n: number
优先级
Remarks
值越小优先级越大
Defined in
assets/@framework/audio/mk_audio_base.ts:545
audio_unit_as
• audio_unit_as: readonly _unit
[] = []
音频列表
Defined in
assets/@framework/audio/mk_audio_base.ts:547
Accessors
play_b
• get
play_b(): boolean
播放状态
Returns
boolean
Defined in
assets/@framework/audio/mk_audio_base.ts:550
stop_b
• get
stop_b(): boolean
停止状态
Returns
boolean
Defined in
assets/@framework/audio/mk_audio_base.ts:555
volume_n
• get
volume_n(): number
音量
Returns
number
Defined in
assets/@framework/audio/mk_audio_base.ts:560
• set
volume_n(value_n_
): void
Parameters
Name | Type |
---|---|
value_n_ | number |
Returns
void
Defined in
assets/@framework/audio/mk_audio_base.ts:564
Methods
play
▸ play(contains_state_n_?
): void
播放
Parameters
Name | Type | Description |
---|---|---|
contains_state_n_ | number | 包含状态,处于这些状态中的音频将被播放,例:mk.audio_.state.pause | mk.audio_.state.stop |
Returns
void
Defined in
assets/@framework/audio/mk_audio_base.ts:600
pause
▸ pause(): void
暂停
Returns
void
Defined in
assets/@framework/audio/mk_audio_base.ts:617
stop
▸ stop(state_b_?
): void
停止
Parameters
Name | Type | Default value |
---|---|---|
state_b_ | boolean | true |
Returns
void
Remarks
- 停止后播放的音频将跳过
Defined in
assets/@framework/audio/mk_audio_base.ts:629
add_audio
▸ add_audio(audio_
): void
添加音频
Parameters
Name | Type |
---|---|
audio_ | unit | unit [] |
Returns
void
Defined in
assets/@framework/audio/mk_audio_base.ts:648
del_audio
▸ del_audio(audio_
): void
删除音频
Parameters
Name | Type |
---|---|
audio_ | unit | unit [] |
Returns
void
Defined in
assets/@framework/audio/mk_audio_base.ts:676
clear
▸ clear(): unit
[]
清理所有音频
Returns
unit
[]