• Studio

  • Bots

  • Web API

  • Designer Resources

  • Host Resources

  • AudioShader

    Inherits from: Object

    Provides functionality for audio manipulation and playback, including volume and pitch adjustments, spatial considerations, and muting capabilities.

    Properties

    isMuted

    boolean

    Indicates whether the audio is currently muted.

    Defines the range in which the audio can be heard.

    volume

    number

    Controls the playback volume of the audio.

    Sets a range for random volume variation.

    pitch

    number

    Adjusts the pitch of the audio playback.

    Sets a range for random pitch variation.

    Methods

    Begins playback of the audio with optional volume and pitch parameters.

    Parameters

    volume

    number

    The volume at which to play the audio. Overrides the instance's volume property for this playback.

    pitch

    number

    The pitch at which to play the audio. Overrides the instance's pitch property for this playback.

    Returns

    void

    This method does not return a value.

    Returns a randomly selected AudioClip from the available set.

    Returns

    AudioClip

    The randomly selected AudioClip object.

    Creates a new instance of AudioShader with a specified AudioClip.

    Parameters

    The AudioClip to associate with the new AudioShader instance.

    Returns

    AudioShader

    A new instance of AudioShader configured with the provided AudioClip.

    PocketWorlds Icon

    © 2024 Pocket Worlds. All rights reserved.