|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.gatech.cs2335.lemmings.engine.Level
This is a playable level. version MAGIC.2 (2004-04-20) - Jose Update Fixed memory leaks version MAGIC - (2004-04-15) - Jose Update Added code to handle lemmings going offscreen no performance hit for catching ArrayIndexOOB
| Constructor Summary | |
Level()
Creates a new Level instance. |
|
| Method Summary | |
void |
addPrettySprite(PrettySprite ps)
Adds a new pretty sprite to the llist of pretty sprites. |
void |
assignJobToLemming(Lemming l)
This function will be called when a lemming has been clicked. |
void |
cleanUp()
Describe cleanUp method here. |
void |
decreaseLemmingFlow()
Decrease the lemming flow rate by 1 |
Level |
duplicate()
Creates a duplicate copy of this level for multiplayer games |
Lemming |
findLemmingAt(java.awt.Point coordinates)
Returns the lemming at given world coordinates, or NULL if no such lemming exists. |
java.lang.String |
getActiveJobId()
Get the value of activeJobId. |
java.util.List |
getActiveLemmings()
Access method for the activeLemmings property. |
LevelData |
getData()
Access method for the data property. |
int |
getJobsRemaining(java.lang.String id)
Returns the number of jobs with the specified id remaining. |
int |
getLemmingFlow()
Accessor for lemmingFlow rate |
java.util.List |
getLemmingHeaven()
Access method for the lemmingHeaven property. |
int |
getLemmingsDead()
Access method for the lemmingsDead property. |
int |
getLemmingsReleased()
Access method for the lemmingsReleased property. |
int |
getLemmingsSaved()
Access method for the lemmingsSaved property. |
java.util.List |
getLevelPortals()
Access method for the levelPortals property. |
Map |
getMap()
Access method for the map property. |
int |
getNumLemmings()
accessor |
java.util.List |
getPendingLemmings()
Access method for the pendingLemmings property. |
java.util.List |
getPrettySprites()
Access method for the prettySprites property. |
long |
getTimeIncrement()
Get the value of timeIncrement. |
long |
getTimeRemaining()
Access method for the timeRemaining property. |
void |
increaseLemmingFlow()
Increases the lemming flow rate by 1 |
boolean |
isLevelOver()
Returns true if the level is over. |
boolean |
isPaused()
Describe isPaused method here. |
void |
killLemming(Lemming lemming,
boolean saved)
Kills the lemming passed in. |
void |
killPrettySprite(PrettySprite ps)
Kills the pretty sprite. |
void |
nukeEmALL()
Makes all the lemmings explode. |
void |
pause()
Pauses the level. |
void |
releaseLemming()
Releases a new lemming from the release point. |
void |
setActiveJobId(java.lang.String v)
Set the value of activeJobId. |
void |
setData(LevelData aData)
Sets the value of the data property. |
void |
setLemmingFlow(int rate)
Sets lemmingFlow |
void |
setLemmingsDead(int aLemmingsDead)
Sets the value of the lemmingsDead property. |
void |
setLemmingsReleased(int aLemmingsReleased)
Sets the value of the lemmingsReleased property. |
void |
setLemmingsSaved(int aLemmingsSaved)
Sets the value of the lemmingsSaved property. |
void |
setMap(Map aMap)
Sets the value of the map property. |
void |
setNumberOfLemmings(int num)
Describe setNumberOfLemmings method here. |
void |
setNumLemmings(int i)
mutator |
void |
setTimeIncrement(long v)
Set the value of timeIncrement. |
void |
setTimeRemaining(long aTimeRemaining)
Sets the value of the timeRemaining property. |
void |
stopLevel()
This function will be called when the level should be stopped - either when the time has run out, or all the lemmings are off the map. |
void |
unpause()
Unpauses the level. |
void |
updateLevel()
Runs through the lemmings and updates each one that needs updating. |
void |
updateLevel(AbstractMessage message)
Updates the level with the message received from the network. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Level()
Level instance.
| Method Detail |
public long getTimeIncrement()
public void setTimeIncrement(long v)
v - Value to assign to timeIncrement.public Map getMap()
public void setMap(Map aMap)
aMap - the new value of the map propertypublic java.util.List getPendingLemmings()
public java.util.List getActiveLemmings()
public java.util.List getLemmingHeaven()
public java.util.List getLevelPortals()
public java.util.List getPrettySprites()
public long getTimeRemaining()
public void setTimeRemaining(long aTimeRemaining)
aTimeRemaining - the new value of the timeRemaining propertypublic int getLemmingsSaved()
public void setLemmingsSaved(int aLemmingsSaved)
aLemmingsSaved - the new value of the lemmingsSaved propertypublic int getLemmingsDead()
public void setLemmingsDead(int aLemmingsDead)
aLemmingsDead - the new value of the lemmingsDead propertypublic int getLemmingsReleased()
public void setLemmingsReleased(int aLemmingsReleased)
aLemmingsReleased - the new value of the lemmingsReleased propertypublic LevelData getData()
public void setNumberOfLemmings(int num)
setNumberOfLemmings method here.
num - an int valuepublic void setData(LevelData aData)
aData - the new value of the data propertypublic java.lang.String getActiveJobId()
public void setActiveJobId(java.lang.String v)
v - Value to assign to activeJobId.public int getJobsRemaining(java.lang.String id)
id - a String value
int valuepublic void addPrettySprite(PrettySprite ps)
ps - a PrettySprite valuepublic void killPrettySprite(PrettySprite ps)
ps - a PrettySprite valuepublic void pause()
public void unpause()
public boolean isPaused()
isPaused method here.
public void stopLevel()
public boolean isLevelOver()
public void updateLevel()
public void updateLevel(AbstractMessage message)
message - mespublic void releaseLemming()
public void nukeEmALL()
public void killLemming(Lemming lemming,
boolean saved)
lemming - The lemming to be killed.saved - If true, then the lemming will be counted as
saved. Otherwise, it will count as dead.public void assignJobToLemming(Lemming l)
l - a Lemming valuepublic Lemming findLemmingAt(java.awt.Point coordinates)
coordinates - a Point value
Lemming valuepublic void cleanUp()
cleanUp method here.
cleanUp in interface ICleanablepublic int getLemmingFlow()
public void increaseLemmingFlow()
public void decreaseLemmingFlow()
public int getNumLemmings()
public void setNumLemmings(int i)
i - value for numLemmingspublic void setLemmingFlow(int rate)
rate - , new flowratepublic Level duplicate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||