Class games.Battle.client.ClientApplet.ClientLook
All Packages Class Hierarchy This Package Previous Next Index
Class games.Battle.client.ClientApplet.ClientLook
java.lang.Object
|
+----games.Battle.client.ClientApplet.ClientLook
- public class ClientLook
- extends Object
ClientLook is a base class which defines the interface (and some
implementation) for a set of classes used to implement the "look"
of the client. By deriving a new class from ClientLook and
overriding the update(b) and updateTerrain() methods, an entirely
new look can be written for the client.
Typically the terrain is generated once at the beginning of the
game after the client has received the TerrainInit packet from
the server. After that, updateTerrain() should not need to be
called again. update() is called on every turn and allows all
of the troops and pipes to be drawn.
The original Europa client has two look classes: ClientLookArcade
and ClientLookTraditional.
-
component
- A reference to the ClientBoardComponent instance for this game board.
-
offGC
-
A graphics context to the offscren image.
-
offScreenImage
- A reference to the ClientBoardComponent's offscreen image.
-
onGC
- A graphics context to the ClientBoardComponent's drawing area.
-
ClientLook(ClientBoardComponent)
- Initialize the ClientLook data members.
-
update(ClientBoard)
- Abstract method redefined in subclasses to actually physically
update the graphical state of the board during the game.
-
updateDisplay()
- Forces the offscreen graphic to draw on the ClientBoardComponent.
-
updateTerrain(ClientBoard)
- Abstract method redefined in subclasses to update the
background terrain of the game board.
offScreenImage
protected Image offScreenImage
- A reference to the ClientBoardComponent's offscreen image.
offGC
protected Graphics offGC
- A graphics context to the offscren image.
onGC
protected Graphics onGC
- A graphics context to the ClientBoardComponent's drawing area.
component
protected ClientBoardComponent component
- A reference to the ClientBoardComponent instance for this game board.
ClientLook
public ClientLook(ClientBoardComponent c)
- Initialize the ClientLook data members. It basically references
the ClientBoardComponent's offscreen bitmap (which the look
draws into) and builds a graphics context for the offscreen
bitmap and the onscreen bitmap.
- Parameters:
- c - the ClientBoardComponent we are drawing into
update
public abstract void update(ClientBoard b)
- Abstract method redefined in subclasses to actually physically
update the graphical state of the board during the game.
updateTerrain
public abstract void updateTerrain(ClientBoard b)
- Abstract method redefined in subclasses to update the
background terrain of the game board.
updateDisplay
public void updateDisplay()
- Forces the offscreen graphic to draw on the ClientBoardComponent.
All Packages Class Hierarchy This Package Previous Next Index