net.kolls.railworld.sound
Class NoSound

java.lang.Object
  extended by net.kolls.railworld.Sound
      extended by net.kolls.railworld.sound.NoSound

public class NoSound
extends Sound

Provides an empty interface that pretends to play sounds, but does nothing. This is useful if for some reason the sound systems all causing trouble. This way we don't have to extend anything to have a "sound off" option.

Author:
Steve Kollmansberger

Field Summary
 
Fields inherited from class net.kolls.railworld.Sound
frozen, fzlc, loopcnt
 
Constructor Summary
NoSound()
           
 
Method Summary
 boolean canPlay()
          Is the sound loaded and ready to play?
 void loop()
          Loop the sound.
 void play()
          Play the sound.
 boolean playing()
          Indicate if the sound is currently playing or looping.
 void stop()
          Stop the sound.
 
Methods inherited from class net.kolls.railworld.Sound
freeze, unfreeze
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoSound

public NoSound()
Method Detail

canPlay

public boolean canPlay()
Description copied from class: Sound
Is the sound loaded and ready to play?

Specified by:
canPlay in class Sound
Returns:
true if the sound can be played.

loop

public void loop()
Description copied from class: Sound
Loop the sound. If the sound is already looping, increment the loop counter.

Specified by:
loop in class Sound

play

public void play()
Description copied from class: Sound
Play the sound.

Specified by:
play in class Sound

playing

public boolean playing()
Description copied from class: Sound
Indicate if the sound is currently playing or looping.

Specified by:
playing in class Sound
Returns:
true if the sound is playing.

stop

public void stop()
Description copied from class: Sound
Stop the sound. If multiple loops are in effect, simply decrement the loop counter.

Specified by:
stop in class Sound