跳至主要內容

Class: group

muzzik大约 1 分钟

index / audio_ / group

Class: group

audio_.group

音频组

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new group(init_, priority_n_)

Parameters

NameType
init_audio
priority_n_number

Defined in

assets/@framework/audio/mk_audio_base.ts:534open in new window

Properties

priority_n

Readonly priority_n: number

优先级

Remarks

值越小优先级越大

Defined in

assets/@framework/audio/mk_audio_base.ts:545open in new window


audio_unit_as

audio_unit_as: readonly _unit[] = []

音频列表

Defined in

assets/@framework/audio/mk_audio_base.ts:547open in new window

Accessors

play_b

get play_b(): boolean

播放状态

Returns

boolean

Defined in

assets/@framework/audio/mk_audio_base.ts:550open in new window


stop_b

get stop_b(): boolean

停止状态

Returns

boolean

Defined in

assets/@framework/audio/mk_audio_base.ts:555open in new window


volume_n

get volume_n(): number

音量

Returns

number

Defined in

assets/@framework/audio/mk_audio_base.ts:560open in new window

set volume_n(value_n_): void

Parameters

NameType
value_n_number

Returns

void

Defined in

assets/@framework/audio/mk_audio_base.ts:564open in new window

Methods

play

play(contains_state_n_?): void

播放

Parameters

NameTypeDescription
contains_state_n_number包含状态,处于这些状态中的音频将被播放,例:mk.audio_.state.pause | mk.audio_.state.stop

Returns

void

Defined in

assets/@framework/audio/mk_audio_base.ts:600open in new window


pause

pause(): void

暂停

Returns

void

Defined in

assets/@framework/audio/mk_audio_base.ts:617open in new window


stop

stop(state_b_?): void

停止

Parameters

NameTypeDefault value
state_b_booleantrue

Returns

void

Remarks

  • 停止后播放的音频将跳过

Defined in

assets/@framework/audio/mk_audio_base.ts:629open in new window


add_audio

add_audio(audio_): void

添加音频

Parameters

NameType
audio_unit | unit[]

Returns

void

Defined in

assets/@framework/audio/mk_audio_base.ts:648open in new window


del_audio

del_audio(audio_): void

删除音频

Parameters

NameType
audio_unit | unit[]

Returns

void

Defined in

assets/@framework/audio/mk_audio_base.ts:676open in new window


clear

clear(): unit[]

清理所有音频

Returns

unit[]

Defined in

assets/@framework/audio/mk_audio_base.ts:712open in new window

📣 觉得很赞?分享给你的朋友吧!