org.game.JVirus
Class JVirusPanel.GameListener

java.lang.Object
  |
  +--org.game.JVirus.JVirusPanel.GameListener
All Implemented Interfaces:
ActionControl.IGameListener
Enclosing class:
JVirusPanel

protected class JVirusPanel.GameListener
extends java.lang.Object
implements ActionControl.IGameListener

Callback listener for ActionControl

See Also:
ActionControl

Fields inherited from interface org.game.JVirus.ActionControl.IGameListener
LOSE, WIN
 
Constructor Summary
protected JVirusPanel.GameListener()
           
 
Method Summary
 void gameOver(int reason)
          game over
 void lifesChanged(Avatar avatar)
          lifes from avatar changed
 void scoreChanged(Avatar avatar)
          score from avatar changed
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JVirusPanel.GameListener

protected JVirusPanel.GameListener()
Method Detail

gameOver

public void gameOver(int reason)
game over
Specified by:
gameOver in interface ActionControl.IGameListener
Parameters:
reason - ActionControl.IGameListener.WIN or ActionControl.IGameListener.LOSE

scoreChanged

public void scoreChanged(Avatar avatar)
score from avatar changed
Specified by:
scoreChanged in interface ActionControl.IGameListener
Parameters:
avatar - the current avatar

lifesChanged

public void lifesChanged(Avatar avatar)
lifes from avatar changed
Specified by:
lifesChanged in interface ActionControl.IGameListener
Parameters:
avatar - the current avatar