Package model.itemesAndRewards
Class PointsModel
java.lang.Object
model.itemesAndRewards.PointsModel
Represents a points item in the game.
The `PointsModel` class handles the behavior of points items.
-
Constructor Summary
ConstructorsConstructorDescriptionPointsModel(int value, float x, float y, Constants.PointsManager.PointsType type) Constructs a new `PointsModel` with the specified value, position, and type. -
Method Summary
Modifier and TypeMethodDescriptiongetType()Returns the type of the points item.intgetValue()Returns the value of the points item.floatgetX()Returns the x-coordinate of the points item.floatgetY()Returns the y-coordinate of the points item.booleanisActive()Checks if the points item is active.voidupdate()Updates the state of the points item, including its timers and position.
-
Constructor Details
-
PointsModel
Constructs a new `PointsModel` with the specified value, position, and type.- Parameters:
value- the value of the points itemx- the x-coordinate of the points itemy- the y-coordinate of the points itemtype- 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
-