Package com.mygdx.game.Components
Class PowerUpAssigned
- java.lang.Object
-
- com.mygdx.game.Components.Component
-
- com.mygdx.game.Components.PowerUpAssigned
-
public class PowerUpAssigned extends Component
// Assessment 2 addition // For PowerUp requirement, Holds the current PowerUp and manages it.
-
-
Field Summary
-
Fields inherited from class com.mygdx.game.Components.Component
parent, reqsMet, requirements, type
-
-
Constructor Summary
Constructors Constructor Description PowerUpAssigned()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
AssignPowerUp(PowerUp powerUp)
Assign a PowerUp, disabling the old one if present.void
update()
Each frame checks if the assigned PowerUp is done, and deactivates as necessary.
-
-
-
Method Detail
-
AssignPowerUp
public void AssignPowerUp(PowerUp powerUp)
Assign a PowerUp, disabling the old one if present.- Parameters:
powerUp
- The PowerUp to be assigned
-
-