Interface Viewport
-
- All Known Implementing Classes:
ViewportTools
public interface Viewport
Created with IntelliJ IDEA. User: NotoriousPP Date: 10/15/2014 Time: 1:41 PM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isOnGameScreen(java.awt.Point point)
Determines if point is on the game screen.java.awt.Point
localTileToScreen(Tile tile)
Local tile to offset screen position.java.awt.Point
tileToScreen(int tileX, int tileY, double offsetX, double offsetY, int tileHeight)
Tile to offset screen position.java.awt.Point
tileToScreen(int tileX, int tileY, int tileHeight)
Converts offset set of local coordinates into their screen positionsjava.awt.Point
tileToScreen(Tile tile)
World tile to offset regional tile and converts that regional tile into offset position on the game screen.
-
-
-
Method Detail
-
tileToScreen
java.awt.Point tileToScreen(int tileX, int tileY, int tileHeight)
Converts offset set of local coordinates into their screen positions- Parameters:
tileX
- local X coordinatetileY
- local Y coordinatetileHeight
- Height of the content on the tile.- Returns:
- A point representing the screen coordinate, of which the x/y may be -1.
-
tileToScreen
java.awt.Point tileToScreen(int tileX, int tileY, double offsetX, double offsetY, int tileHeight)
Tile to offset screen position.- Parameters:
tileX
- the tile xtileY
- the tile yoffsetX
- the x offsetoffsetY
- the y offsettileHeight
- the tile height- Returns:
- an on screen point
-
tileToScreen
java.awt.Point tileToScreen(Tile tile)
World tile to offset regional tile and converts that regional tile into offset position on the game screen.- Parameters:
tile
- tile- Returns:
- A point representing the screen coordinate, if not on game screen returns (-1,-1).
-
localTileToScreen
java.awt.Point localTileToScreen(Tile tile)
Local tile to offset screen position.- Parameters:
tile
- tile- Returns:
- A point representing the screen coordinate, of which the x/y may be -1.
-
isOnGameScreen
boolean isOnGameScreen(java.awt.Point point)
Determines if point is on the game screen.- Parameters:
point
- The point to check- Returns:
- true if the point is on game screen or else it's false.
-
-