Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.SoundEffect Class Reference

Simple wrapper for sound effects. More...

Inheritance diagram for PlatformerPro.SoundEffect:

Public Member Functions

virtual void UpdateVolume ()
 Updates the volume. More...
 
virtual void Play ()
 Play the effect. More...
 

Public Attributes

bool multiplyVolume = true
 Multiply source volume? More...
 
AudioClip clip
 The audio clip to play. More...
 
bool playOnStart
 Should we play the sound straight away? More...
 

Protected Member Functions

virtual void Init ()
 

Protected Attributes

float originalVolume
 Store the original volume of the clip; More...
 
AudioSource audioSource
 Cached reference to the audioSource; More...
 

Detailed Description

Simple wrapper for sound effects.

Member Function Documentation

◆ Init()

virtual void PlatformerPro.SoundEffect.Init ( )
protectedvirtual

◆ Play()

virtual void PlatformerPro.SoundEffect.Play ( )
virtual

Play the effect.

◆ UpdateVolume()

virtual void PlatformerPro.SoundEffect.UpdateVolume ( )
virtual

Updates the volume.

Member Data Documentation

◆ audioSource

AudioSource PlatformerPro.SoundEffect.audioSource
protected

Cached reference to the audioSource;

◆ clip

AudioClip PlatformerPro.SoundEffect.clip

The audio clip to play.

◆ multiplyVolume

bool PlatformerPro.SoundEffect.multiplyVolume = true

Multiply source volume?

◆ originalVolume

float PlatformerPro.SoundEffect.originalVolume
protected

Store the original volume of the clip;

◆ playOnStart

bool PlatformerPro.SoundEffect.playOnStart

Should we play the sound straight away?


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