erland.game.tileadventure
Class TileAdventureMain

java.lang.Object
  extended by erland.game.tileadventure.TileAdventureMain
All Implemented Interfaces:
GamePanelInterface

public class TileAdventureMain
extends Object
implements GamePanelInterface

This is the class that controls the drawing on the screen and receives the commands from the user


Field Summary
protected  boolean bQuit
          Indicates if the game should be quit
protected  boolean cheatMode
          Indicates if cheat mode is activated
protected  BlockContainerData cont
          Block container for the tile map
protected  GameEnvironmentInterface environment
          Game environment object
protected  FpsCounter fps
          FPS counter object
protected  KeyListener keyListener
          Key listener that listens on keyboard command
 
Constructor Summary
TileAdventureMain(TileAdventureModelInterface model)
          Creates a TileAdventureMain object using the specified model
 
Method Summary
 void draw()
           
 void exit()
           
 void init(GameEnvironmentInterface environment)
           
 boolean isExit()
           
 void setCheatmode(boolean enable)
           
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cont

protected BlockContainerData cont
Block container for the tile map


bQuit

protected boolean bQuit
Indicates if the game should be quit


keyListener

protected KeyListener keyListener
Key listener that listens on keyboard command


fps

protected FpsCounter fps
FPS counter object


environment

protected GameEnvironmentInterface environment
Game environment object


cheatMode

protected boolean cheatMode
Indicates if cheat mode is activated

Constructor Detail

TileAdventureMain

public TileAdventureMain(TileAdventureModelInterface model)
Creates a TileAdventureMain object using the specified model

Parameters:
model - The model that implements the game logic
Method Detail

isExit

public boolean isExit()
Specified by:
isExit in interface GamePanelInterface

setCheatmode

public void setCheatmode(boolean enable)
Specified by:
setCheatmode in interface GamePanelInterface

exit

public void exit()
Specified by:
exit in interface GamePanelInterface

init

public void init(GameEnvironmentInterface environment)
Specified by:
init in interface GamePanelInterface

update

public void update()
Specified by:
update in interface GamePanelInterface

draw

public void draw()
Specified by:
draw in interface GamePanelInterface


Copyright © 2003-2006 Erland Isaksson. All Rights Reserved.