Class PointsModel

java.lang.Object
model.itemesAndRewards.PointsModel

public class PointsModel extends Object
Represents a points item in the game.

The `PointsModel` class handles the behavior of points items.

  • Constructor Details

    • PointsModel

      public PointsModel(int value, float x, float y, Constants.PointsManager.PointsType type)
      Constructs a new `PointsModel` with the specified value, position, and type.
      Parameters:
      value - the value of the points item
      x - the x-coordinate of the points item
      y - the y-coordinate of the points item
      type - the type of the points item
  • Method Details

    • update

      public void update()
      Updates the state of the points item, including its timers and position.
    • isActive

      public boolean isActive()
      Checks if the points item is active.
      Returns:
      true if the points item is active, false otherwise
    • getType

      Returns the type of the points item.
      Returns:
      the type of the points item
    • getValue

      public int getValue()
      Returns the value of the points item.
      Returns:
      the value of the points item
    • getX

      public float getX()
      Returns the x-coordinate of the points item.
      Returns:
      the x-coordinate of the points item
    • getY

      public float getY()
      Returns the y-coordinate of the points item.
      Returns:
      the y-coordinate of the points item