DoopelPonger
|
Parent class for every power up a player can use. More...
Public Member Functions | |
void | Awake () |
Initialize all references of the power up and make sure the child class has had their awake method called. More... | |
void | Init () |
Initialize the values of the power up and make sure the child class has had their init method called. More... | |
void | TriggerPowerUp (CoopPowerUpController powerUpController) |
The player has triggered the power up and the power up should now do the actions. More... | |
void | FixedUpdate () |
Reccord how long the power up has been active and call the child FixedUpdate method. More... | |
void | RemovePowerUp (bool rightNow) |
Force the power up to end. Used when a player has full charge and then uses the shield to drain the charge causing the power up to go away. More... | |
Public Attributes | |
CoopPlayer | player |
Texture2D | textureIcon |
Protected Member Functions | |
void | PowerUpFinished () |
Available for children to call if they want to power up to end right now. More... | |
void | DestroyPowerUp () |
Available for children to call if they want to power up to end right now without any norifications to other systems. More... | |
abstract void | ChildAwake () |
Allows for implementations to initialize references before use. More... | |
abstract void | ChildInit () |
Allows for implementations to initialize variables before use. More... | |
abstract void | ChildTriggerPowerUp () |
Method called when the player has activated the power up. More... | |
abstract void | ChildFixedUpdate () |
Method called during the fixed update tick. More... | |
abstract void | ChildDespawnPowerUp (bool rightNow) |
The class needs to clean up everything because the power up is not going to be used anymore. More... | |
abstract float | GetMaxTime () |
abstract void | TimeUp () |
The maxTime of the power up has been reached and the child should despawn the power up. More... | |
Protected Attributes | |
EventManager | eventManager |
CoopObjectPooler | objectPooler |
Parent class for every power up a player can use.
void CoopPlayerPowerUp.Awake | ( | ) |
Initialize all references of the power up and make sure the child class has had their awake method called.
|
protectedpure virtual |
Allows for implementations to initialize references before use.
Implemented in CoopPlayerVomitPowerUp, CoopBoomerangController, CoopVShooterController, CoopHomingMissileController, CoopMiniShooterController, CoopPlayerLaserController, CoopHealthBackPowerUp, and CoopSlowMoPowerUp.
|
protectedpure virtual |
The class needs to clean up everything because the power up is not going to be used anymore.
rightNow | Used to also tell the power up to destory itself immediately. As of right now, this use case isn't actually used. |
Implemented in CoopVShooterController, CoopPlayerVomitPowerUp, CoopBoomerangController, CoopHomingMissileController, CoopMiniShooterController, CoopPlayerLaserController, CoopHealthBackPowerUp, and CoopSlowMoPowerUp.
|
protectedpure virtual |
Method called during the fixed update tick.
Implemented in CoopBoomerangController, CoopPlayerVomitPowerUp, CoopVShooterController, CoopHomingMissileController, CoopMiniShooterController, CoopPlayerLaserController, CoopHealthBackPowerUp, and CoopSlowMoPowerUp.
|
protectedpure virtual |
Allows for implementations to initialize variables before use.
Implemented in CoopHomingMissileController, CoopMiniShooterController, CoopBoomerangController, CoopPlayerVomitPowerUp, CoopVShooterController, CoopPlayerLaserController, CoopHealthBackPowerUp, and CoopSlowMoPowerUp.
|
protectedpure virtual |
Method called when the player has activated the power up.
Implemented in CoopHomingMissileController, CoopMiniShooterController, CoopBoomerangController, CoopVShooterController, CoopPlayerVomitPowerUp, CoopPlayerLaserController, CoopHealthBackPowerUp, and CoopSlowMoPowerUp.
|
protected |
Available for children to call if they want to power up to end right now without any norifications to other systems.
void CoopPlayerPowerUp.FixedUpdate | ( | ) |
Reccord how long the power up has been active and call the child FixedUpdate method.
|
protectedpure virtual |
Implemented in CoopHomingMissileController, CoopPlayerVomitPowerUp, CoopMiniShooterController, CoopBoomerangController, CoopVShooterController, CoopPlayerLaserController, CoopHealthBackPowerUp, and CoopSlowMoPowerUp.
void CoopPlayerPowerUp.Init | ( | ) |
Initialize the values of the power up and make sure the child class has had their init method called.
|
protected |
Available for children to call if they want to power up to end right now.
void CoopPlayerPowerUp.RemovePowerUp | ( | bool | rightNow | ) |
Force the power up to end. Used when a player has full charge and then uses the shield to drain the charge causing the power up to go away.
rightNow | Used to also tell the power up to destory itself immediately. As of right now, this use case isn't actually used. |
|
protectedpure virtual |
The maxTime of the power up has been reached and the child should despawn the power up.
Implemented in CoopHomingMissileController, CoopPlayerVomitPowerUp, CoopMiniShooterController, CoopBoomerangController, CoopVShooterController, CoopPlayerLaserController, CoopHealthBackPowerUp, and CoopSlowMoPowerUp.
void CoopPlayerPowerUp.TriggerPowerUp | ( | CoopPowerUpController | powerUpController | ) |
The player has triggered the power up and the power up should now do the actions.
powerUpController | The power up controller that spawned the power up. |
|
protected |
|
protected |
CoopPlayer CoopPlayerPowerUp.player |
The player the power up belongs to.
Texture2D CoopPlayerPowerUp.textureIcon |
The image of the power up that is displayed in the UI once the power up is chosen.