C# Class BBGamelib.SimpleAudioEngine

Inheritance: UnityEngine.MonoBehaviour
Datei anzeigen Open project: BigWoodGames/cocos2d-unity Class Usage Examples

Public Methods

Method Description
Awake ( ) : void
pauseBackgroundMusic ( ) : void
playBackgroundMusic ( string filePath, bool loop = true ) : void
playEffect ( string filePath ) : int
preloadBackgroundMusic ( string filePath ) : void
resumeBackgroundMusic ( ) : void
stopBackgroundMusic ( ) : void
stopEffect ( int soundId ) : void

Private Methods

Method Description
getAudioClip ( string filePath ) : AudioClip
playAudio ( AudioClip audio, AudioSource source, bool loop, float volume ) : void

Method Details

Awake() public method

public Awake ( ) : void
return void

pauseBackgroundMusic() public method

public pauseBackgroundMusic ( ) : void
return void

playBackgroundMusic() public method

public playBackgroundMusic ( string filePath, bool loop = true ) : void
filePath string
loop bool
return void

playEffect() public method

public playEffect ( string filePath ) : int
filePath string
return int

preloadBackgroundMusic() public method

public preloadBackgroundMusic ( string filePath ) : void
filePath string
return void

resumeBackgroundMusic() public method

public resumeBackgroundMusic ( ) : void
return void

stopBackgroundMusic() public method

public stopBackgroundMusic ( ) : void
return void

stopEffect() public method

public stopEffect ( int soundId ) : void
soundId int
return void