|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.maps.AbstractCamera wyvern.kernel.player.MapCamera
This object maintains a view of the game map for a client.
Field Summary | |
static int |
fullCount_
|
static int |
fullTime_
|
static int |
partialCount_
|
static int |
partialTime_
|
Fields inherited from class wyvern.kernel.maps.AbstractCamera |
bounds_, client_, completelyInvalid_, frame_, hasMoved_, height_, left_, map_, player_, ready_, size_, top_, width_, xoffset_, yoffset_ |
Constructor Summary | |
MapCamera(RemoteClient client,
Dimension viewsize,
Player player)
Constructs a new MapCamera. |
Method Summary | |
protected boolean |
handleUpdate(Frame frame)
Sends frame information to client. |
DisplayPolicy |
makeFrame()
A factory method that instantiates an DisplayPolicy subclass appropriate for this camera. |
void |
sendFullScreen(Frame frame)
Sends the entire frame. |
protected boolean |
sendPartialScreen(Frame frame)
Sends a set of changes (as opposed to the whole screen). |
void |
setMap(GameMap map,
int x,
int y)
Centers the camera view around the passed position. |
java.lang.String |
toString()
Returns a string description of this camera. |
boolean |
updateClient(DisplayPolicy frame)
Main entry point to the camera - sends current set of changes to the client. |
Methods inherited from class wyvern.kernel.maps.AbstractCamera |
forceInvalidate, getCenter, getFrame, getMap, getOwner, getPosition, getViewRect, getViewSize, hasBeenMoved, invalidate, invalidateNoRayCast, isHandheld, isInvalid, isShutDown, markReady, markValid, move, moveFrame, setHandheld, setMap, setMoved, setPosition, setViewRect, setViewSize, shutDown, tryUpdate, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static int partialCount_
public static int partialTime_
public static int fullCount_
public static int fullTime_
Constructor Detail |
public MapCamera(RemoteClient client, Dimension viewsize, Player player) throws java.lang.Exception
client
- the remote networking layer to talk toviewsize
- the initial size of the cameraplayer
- the player we're attached toMethod Detail |
public boolean updateClient(DisplayPolicy frame)
updateClient
in class AbstractCamera
frame
- the DisplayPolicy containing the update information
protected boolean handleUpdate(Frame frame) throws java.lang.Exception
frame
- the Frame containing the update information
java.lang.Exception
public void sendFullScreen(Frame frame)
frame
- the Frame containing the updatesprotected boolean sendPartialScreen(Frame frame) throws java.io.IOException
frame
- the Frame containing the updates
java.io.IOException
public DisplayPolicy makeFrame()
public void setMap(GameMap map, int x, int y)
setMap
in interface Camera
setMap
in class AbstractCamera
public java.lang.String toString()
toString
in class AbstractCamera
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |