FlightKit
Awesome Flight Simulator Kit
ButtonSound Class Reference

Simple script that plays a sound once a method is called. Useful for sounds happening on UI button clicks. More...

Inheritance diagram for ButtonSound:

Public Member Functions

virtual void PlaySound ()
 Play button sound once. More...
 
virtual void PlaySound (bool activated)
 Play button sound once. This overload is useful for toggle groups. More...
 

Public Attributes

string audioSourceContainerName = "SoundFX"
 Name of GameObject holding an AudioSource for sound effects. More...
 
AudioClip sound
 The sound to play whenever PlaySound() is called. More...
 

Detailed Description

Simple script that plays a sound once a method is called. Useful for sounds happening on UI button clicks.

Member Function Documentation

virtual void ButtonSound.PlaySound ( )
virtual

Play button sound once.

virtual void ButtonSound.PlaySound ( bool  activated)
virtual

Play button sound once. This overload is useful for toggle groups.

Parameters
playIf the sound should be played. This method does nothing if false is passed.

Member Data Documentation

string ButtonSound.audioSourceContainerName = "SoundFX"

Name of GameObject holding an AudioSource for sound effects.

AudioClip ButtonSound.sound

The sound to play whenever PlaySound() is called.


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