|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjurpe.dungeon.rpgmap.MapView
public class MapView
Viewport of RpgMap.
| Constructor Summary | |
|---|---|
MapView(RpgMap rpgmap,
short viewWidth,
short viewHeight)
Constructor |
|
| Method Summary | |
|---|---|
RpgMapPoint |
getBottomRight()
Get bottom right coordinates, relative to RpgMap, of viewport |
Cell |
getCell(HexPoint p)
Get RpgMapCell at RpgMapCoordinates XY |
Cell |
getCell(short x,
short y)
Get RpgMapCell at RpgMapCoordinates XY |
RpgMapPoint |
getCenter()
Get current center |
short |
getCurrentBottom()
|
short |
getCurrentLeft()
|
short |
getCurrentRight()
|
short |
getCurrentTop()
|
short |
getHeight()
Viewport height |
Direction |
getPerimeterEdge(RpgMapPoint avp)
This method returns true if the point avp is "next" to a viewport perimeter (up, down, left, right). |
RpgMapPoint |
getTopLeft()
Get top left coordinates, relative to RpgMap, of viewport |
ViewMapPoint |
getViewPosition(RpgMapPoint a)
Return coordinates in view position, given the RpgMap absolute position |
short |
getWidth()
Viewport width |
boolean |
isInside(RpgMapPoint position)
Returns true if the position is inside the RpgMapView width and height |
MapIterator |
iterator()
Iterator |
void |
scrollView(RpgMapPoint avatarPoint,
Direction dir)
Scroll this view in the Direction d. |
void |
setCenter(RpgMapPoint sCenter)
Set new center |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapView(RpgMap rpgmap,
short viewWidth,
short viewHeight)
rpgmap - Entire map for which this is a viewviewWidth - Width of this viewportviewHeight - Height of this viewport| Method Detail |
|---|
public RpgMapPoint getCenter()
public Cell getCell(HexPoint p)
getCell in interface ILogicalMapp - RpgMapPoint View relative point
public Cell getCell(short x,
short y)
x - x coordinatey - y coordinate
public boolean isInside(RpgMapPoint position)
isInside in interface ILogicalMapposition - Point coordinates of an hexagon
public short getWidth()
getWidth in interface ILogicalMappublic short getHeight()
getHeight in interface ILogicalMappublic RpgMapPoint getTopLeft()
getTopLeft in interface ILogicalMappublic RpgMapPoint getBottomRight()
getBottomRight in interface ILogicalMappublic MapIterator iterator()
iterator in interface ILogicalMappublic void setCenter(RpgMapPoint sCenter)
sCenter - RpgMapPoint
public void scrollView(RpgMapPoint avatarPoint,
Direction dir)
avatarPoint - Point in which avatar isdir - Direction in which avatar is goingpublic ViewMapPoint getViewPosition(RpgMapPoint a)
a - RpgMap point
public Direction getPerimeterEdge(RpgMapPoint avp)
avp - Point in RpgMap
public short getCurrentTop()
public short getCurrentBottom()
public short getCurrentLeft()
public short getCurrentRight()
|
Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||