神岛 API 文档 - ArenaPro版
    Preparing search index...

    Interface GameSoundEffectConfig

    定义游戏音效配置的接口。

    Defines the interface for game sound effect configuration.

    此接口用于标准化音效配置,确保音效在游戏中的表现一致性和可预测性。

    This interface is used to standardize sound effect configuration, ensuring consistency and predictability of sound effects in the game.

    interface GameSoundEffectConfig {
        gain: number;
        gainRange: number;
        pitch: number;
        pitchRange: number;
        radius: number;
        sample: string;
    }

    Implemented by

    Index

    Properties

    gain: number

    音效的基础音量增益,用于控制音效的初始响度。

    Base volume gain for the sound effect, used to control the initial loudness of the sound effect.

    gainRange: number

    音量增益的变化范围,用于随机化音效的响度,增加真实感。

    Range of volume gain variation, used to randomize the loudness of sound effects, adding realism.

    pitch: number

    音效的基础音高,用于控制音效的初始频率。

    Base pitch for the sound effect, used to control the initial frequency of the sound effect.

    pitchRange: number

    音高变化的范围,用于随机化音效的频率,增加多样性和真实感。

    Range of pitch variation, used to randomize the frequency of sound effects, adding diversity and realism.

    radius: number

    音效生效的最大半径,超出此范围将无法听到音效。

    Maximum radius for the sound effect to take effect, beyond which the sound effect cannot be heard.

    sample: string

    音效样本的标识符,用于引用特定的音效资源。

    Identifier for the sound effect sample, used to reference specific sound effect resources.