Class BouncyPad

java.lang.Object
nz.ac.vuw.ecs.swen225.gp22.domain.Tile
nz.ac.vuw.ecs.swen225.gp22.domain.BouncyPad

public class BouncyPad extends Tile
Represents a tile that makes the player jump by 2 tiles in a direction.
Author:
Abdul
  • Constructor Details

    • BouncyPad

      public BouncyPad(Maze.Point tilePos, Entity.Direction dir)
      Default constructor, sets the position of the tile, obstructiveness to false, and the direction of the bounce pad.
      Parameters:
      tilePos - Point to set the position field to.
      dir - The Direction the player will get bounced in.
  • Method Details

    • getDir

      public Entity.Direction getDir()
      Returns:
      The Direction the player will get bounced in.
    • deleteTile

      public void deleteTile()
      Description copied from class: Tile
      Called when a tile is removed or replaced. This method is not abstract because not all tiles will need special code to run on deletion.
      Overrides:
      deleteTile in class Tile
    • toString

      public String toString()
      Overrides:
      toString in class Object