Search Results for

    Show / Hide Table of Contents

    Class BackgroundAudio.Player

    The that plays a BackgroundAudio.

    Inheritance
    Object
    BackgroundAudio.Player
    Namespace: OmiyaGames.Audio
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class Player : MonoBehaviour

    Properties

    Data

    The BackgroundAudio that generated this instance. Also holds the s that this instance plays.

    Declaration
    public abstract BackgroundAudio Data { get; }
    Property Value
    Type Description
    BackgroundAudio

    IsPausedOnTimeStop

    Gets or sets whether this player should pause when is zero.

    Declaration
    public abstract bool IsPausedOnTimeStop { get; set; }
    Property Value
    Type Description
    Boolean

    MixerGroup

    Sets the mixer group this player streams its audio through.

    Declaration
    public abstract AudioMixerGroup MixerGroup { set; }
    Property Value
    Type Description
    AudioMixerGroup
    Remarks

    Primarily used by MixerGroupManager to handle fade-ins and fade-outs.

    State

    Gets the state of this player.

    Declaration
    public abstract BackgroundAudio.PlayState State { get; }
    Property Value
    Type Description
    BackgroundAudio.PlayState

    Methods

    OnDestroy()

    Declaration
    protected virtual void OnDestroy()

    Play(PlaybackArgs)

    Plays the audio from Data.

    Declaration
    public abstract void Play(PlaybackArgs args)
    Parameters
    Type Name Description
    PlaybackArgs args

    Adds additional configuration details, such as delaying when the player starts playing. This argument can be null, in which case the player starts immediately.

    Remarks

    If State is already set to Playing, this method does nothing.

    Stop()

    Stops playing the audio.

    Declaration
    public abstract void Stop()
    Remarks

    If State is already set to Stopped, this method does nothing.

    Events

    OnAfterChangeState

    Event that triggers after State changes.

    Declaration
    public abstract event ITrackable<BackgroundAudio.PlayState>.ChangeEvent OnAfterChangeState
    Event Type
    Type Description
    ITrackable.ChangeEvent<>

    OnBeforeChangeState

    Event that triggers before State changes.

    Declaration
    public abstract event ITrackable<BackgroundAudio.PlayState>.ChangeEvent OnBeforeChangeState
    Event Type
    Type Description
    ITrackable.ChangeEvent<>

    OnBeforeDestroy

    Event that triggers when this script is destroyed.

    Declaration
    public event Action<BackgroundAudio.Player> OnBeforeDestroy
    Event Type
    Type Description
    Action<BackgroundAudio.Player>
    In This Article
    Back to top Copyright © 2022 Omiya Games