Class Viewport
java.lang.Object
nz.ac.vuw.ecs.swen225.gp6.renderer.Viewport
change the array to be centered on the player.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]find the Hero in the Tile[][] and return its positionstatic Tile[][]getViewport(Tile[][] gameArray, int renderSize) get a viewport for the current game array.
-
Constructor Details
-
Viewport
public Viewport()
-
-
Method Details
-
getViewport
get a viewport for the current game array.- Parameters:
gameArray- the game arrayrenderSize- the size of the viewport- Returns:
- the viewport
-
findHero
find the Hero in the Tile[][] and return its position- Parameters:
gameArray- the game array- Returns:
- int[]
-