edu.uiuc.cs397rhc.game
Class Mood

java.lang.Object
  extended by edu.uiuc.cs397rhc.game.Mood
All Implemented Interfaces:
Equalizable
Direct Known Subclasses:
MidiMood, MP3Mood

public abstract class Mood
extends java.lang.Object
implements Equalizable

A Mood is background music that is Equalizable and which will fade in when begun and fade out when ended.

Author:
Pedro DeRose

Constructor Summary
Mood()
           
 
Method Summary
abstract  void begin()
          Begins the music by fading it in.
abstract  void end()
          Ends the music by fading it out.
abstract  double getVolumePercentage()
          Gets the independent volume percentage of the object.
abstract  boolean isActive()
          Whether the Mood is playing.
abstract  void setVolumePercentage(double percent)
          Sets the volume percentage of the object independently of other volume manipulations, such as fading.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mood

public Mood()
Method Detail

isActive

public abstract boolean isActive()
Whether the Mood is playing.

Returns:
true if playing, false otherwise

begin

public abstract void begin()
Begins the music by fading it in.


end

public abstract void end()
Ends the music by fading it out.


setVolumePercentage

public abstract void setVolumePercentage(double percent)
Description copied from interface: Equalizable
Sets the volume percentage of the object independently of other volume manipulations, such as fading.

Specified by:
setVolumePercentage in interface Equalizable
Parameters:
percent - the new volume percentage

getVolumePercentage

public abstract double getVolumePercentage()
Description copied from interface: Equalizable
Gets the independent volume percentage of the object.

Specified by:
getVolumePercentage in interface Equalizable
Returns:
the volume percentage