Class PowerUpAssigned


  • public class PowerUpAssigned
    extends Component
    // Assessment 2 addition // For PowerUp requirement, Holds the current PowerUp and manages it.
    • Constructor Detail

      • PowerUpAssigned

        public PowerUpAssigned()
    • Method Detail

      • AssignPowerUp

        public void AssignPowerUp​(PowerUp powerUp)
        Assign a PowerUp, disabling the old one if present.
        Parameters:
        powerUp - The PowerUp to be assigned
      • update

        public void update()
        Each frame checks if the assigned PowerUp is done, and deactivates as necessary.
        Overrides:
        update in class Component