Class Viewport

java.lang.Object
nz.ac.vuw.ecs.swen225.gp6.renderer.Viewport

public class Viewport extends Object
change the array to be centered on the player.
  • Constructor Details

    • Viewport

      public Viewport()
  • Method Details

    • getViewport

      public static Tile[][] getViewport(Tile[][] gameArray, int renderSize)
      get a viewport for the current game array.
      Parameters:
      gameArray - the game array
      renderSize - the size of the viewport
      Returns:
      the viewport
    • findHero

      public static int[] findHero(Tile[][] gameArray)
      find the Hero in the Tile[][] and return its position
      Parameters:
      gameArray - the game array
      Returns:
      int[]