DoopelPonger
|
Shield activated by the player used to block balls and send them flying in the opposite direction. More...
Public Member Functions | |
void | Awake () |
Initialize event listeners, input callbacks, and the state machine for use. More... | |
void | OnDestroy () |
Remove input callbacks and event listeners when the player dies. More... | |
void | FixedUpdate () |
Perform actions based on the current state of the shield. More... | |
void | ShieldActive () |
void | RegisterNewTriggerOption (InputManager.InputTriggerOption newTriggerOption) |
Change the button used to trigger the shield. More... | |
void | RegisterShield () |
Register the keyboard input to the InputManager. More... | |
void | DeregisterAllControls () |
Deregister the keyboard input to the InputManager. More... | |
void | BringShieldDown () |
Only used in the tutorial to force the shield to be removed, even if the the player is pressing a button. More... | |
Public Attributes | |
CoopPlayer | player |
InputManager.InputTriggerOption | triggerOption |
GameObject | shield |
CoopPowerUpController | powerUpController |
float | initialChargeDecrease |
float | chargeDecreaseRate |
Shield activated by the player used to block balls and send them flying in the opposite direction.
The shield is activated by the keyboard and requires power up charge to use. This class does not handle any animations of the shield, it only decides when/if animations can play. The shield animations are handled by the CoopPlayerShieldAnimator class.
void CoopPlayerShield.Awake | ( | ) |
Initialize event listeners, input callbacks, and the state machine for use.
void CoopPlayerShield.BringShieldDown | ( | ) |
Only used in the tutorial to force the shield to be removed, even if the the player is pressing a button.
void CoopPlayerShield.DeregisterAllControls | ( | ) |
Deregister the keyboard input to the InputManager.
void CoopPlayerShield.FixedUpdate | ( | ) |
Perform actions based on the current state of the shield.
void CoopPlayerShield.OnDestroy | ( | ) |
Remove input callbacks and event listeners when the player dies.
void CoopPlayerShield.RegisterNewTriggerOption | ( | InputManager.InputTriggerOption | newTriggerOption | ) |
Change the button used to trigger the shield.
void CoopPlayerShield.RegisterShield | ( | ) |
Register the keyboard input to the InputManager.
void CoopPlayerShield.ShieldActive | ( | ) |
float CoopPlayerShield.chargeDecreaseRate |
The amount of charge that is removed per second as the shield button is held.
float CoopPlayerShield.initialChargeDecrease |
The amount of charge that is removed once the shield button is pressed.
CoopPlayer CoopPlayerShield.player |
The player the shield belongs to.
CoopPowerUpController CoopPlayerShield.powerUpController |
The players power up controller that should be used to check the charge level and remove charge when the shield is activated.
GameObject CoopPlayerShield.shield |
The actualy shield gameObject. As of writing this, the property isn't actually used in the class.
InputManager.InputTriggerOption CoopPlayerShield.triggerOption |
The button that should be used to activate the shield.