Class Ghost

All Implemented Interfaces:
IAttackable

public class Ghost extends Animal
The ghost class.
  • Constructor Details

    • Ghost

      public Ghost(Renderer render, Game game, int x, int y, int speed)
      Creates a new Ghost.
      Parameters:
      render - the Renderer where the ghost will be drawn on
      game - the Game where the ghost interacts
      x - the x coordinate
      y - the y coordinate
      speed - the speed of the ghost
  • Method Details

    • initTexture

      public void initTexture()
      Description copied from class: Entity
      Initializes the base texture.
      Specified by:
      initTexture in class Entity
    • update

      public void update()
      Updates the entity. The ghost will curse any entity it goes through.
      Overrides:
      update in class Animal
    • setCurrentAnimalImage

      public void setCurrentAnimalImage()
      Description copied from class: Animal
      Set the current animal's sprite.
      Specified by:
      setCurrentAnimalImage in class Animal
    • getPoint

      public int getPoint()
      Description copied from class: Animal
      Gets the points of the animal.
      Specified by:
      getPoint in class Animal
      Returns:
      the points of the animal