Infinite Runner Engine v2.2
Loading...
Searching...
No Matches
MoreMountains.InfiniteRunnerEngine.BackgroundMusic Class Reference

Add this class to a GameObject to have it play a background music when instanciated. Careful : only one background music will be played at a time. More...

Inheritance diagram for MoreMountains.InfiniteRunnerEngine.BackgroundMusic:
MoreMountains.Tools.MMPersistentHumbleSingleton< T >

Public Attributes

AudioClip SoundClip
 The audioclip to play.
Public Attributes inherited from MoreMountains.Tools.MMPersistentHumbleSingleton< T >
float InitializationTime
 the timestamp at which this singleton got initialized

Protected Member Functions

virtual void Start ()
 Gets the AudioSource associated to that GameObject, and asks the GameManager to play it.
Protected Member Functions inherited from MoreMountains.Tools.MMPersistentHumbleSingleton< T >
virtual void Awake ()
 On awake, we check if there's already a copy of the object in the scene. If there's one, we destroy it.
virtual void InitializeSingleton ()
 Initializes the singleton.

Protected Attributes

AudioSource _source

Additional Inherited Members

Static Protected Attributes inherited from MoreMountains.Tools.MMPersistentHumbleSingleton< T >
static T _instance
Properties inherited from MoreMountains.Tools.MMPersistentHumbleSingleton< T >
static bool HasInstance [get]
 whether or not this singleton already has an instance
static T Current [get]
static T Instance [get]
 Singleton design pattern.

Detailed Description

Add this class to a GameObject to have it play a background music when instanciated. Careful : only one background music will be played at a time.

Member Function Documentation

◆ Start()

virtual void MoreMountains.InfiniteRunnerEngine.BackgroundMusic.Start ( )
protectedvirtual

Gets the AudioSource associated to that GameObject, and asks the GameManager to play it.

Member Data Documentation

◆ _source

AudioSource MoreMountains.InfiniteRunnerEngine.BackgroundMusic._source
protected

◆ SoundClip

AudioClip MoreMountains.InfiniteRunnerEngine.BackgroundMusic.SoundClip

The audioclip to play.


The documentation for this class was generated from the following file: