Class Slime

All Implemented Interfaces:
IAttackable

public class Slime extends Animal
The slime class.
  • Constructor Details

    • Slime

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

    • initTexture

      public void initTexture()
      Description copied from class: Entity
      Initializes the base texture.
      Specified by:
      initTexture in class Entity
    • 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