DoopelPonger
Public Member Functions | Public Attributes | List of all members
CoopPlayerShield Class Reference

Shield activated by the player used to block balls and send them flying in the opposite direction. More...

Inheritance diagram for CoopPlayerShield:
Inheritance graph
[legend]
Collaboration diagram for CoopPlayerShield:
Collaboration graph
[legend]

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
 

Detailed Description

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.

Member Function Documentation

◆ Awake()

void CoopPlayerShield.Awake ( )

Initialize event listeners, input callbacks, and the state machine for use.

◆ BringShieldDown()

void CoopPlayerShield.BringShieldDown ( )

Only used in the tutorial to force the shield to be removed, even if the the player is pressing a button.

◆ DeregisterAllControls()

void CoopPlayerShield.DeregisterAllControls ( )

Deregister the keyboard input to the InputManager.

◆ FixedUpdate()

void CoopPlayerShield.FixedUpdate ( )

Perform actions based on the current state of the shield.

◆ OnDestroy()

void CoopPlayerShield.OnDestroy ( )

Remove input callbacks and event listeners when the player dies.

◆ RegisterNewTriggerOption()

void CoopPlayerShield.RegisterNewTriggerOption ( InputManager.InputTriggerOption  newTriggerOption)

Change the button used to trigger the shield.

◆ RegisterShield()

void CoopPlayerShield.RegisterShield ( )

Register the keyboard input to the InputManager.

◆ ShieldActive()

void CoopPlayerShield.ShieldActive ( )

Member Data Documentation

◆ chargeDecreaseRate

float CoopPlayerShield.chargeDecreaseRate

The amount of charge that is removed per second as the shield button is held.

◆ initialChargeDecrease

float CoopPlayerShield.initialChargeDecrease

The amount of charge that is removed once the shield button is pressed.

◆ player

CoopPlayer CoopPlayerShield.player

The player the shield belongs to.

◆ powerUpController

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.

◆ shield

GameObject CoopPlayerShield.shield

The actualy shield gameObject. As of writing this, the property isn't actually used in the class.

◆ triggerOption

InputManager.InputTriggerOption CoopPlayerShield.triggerOption

The button that should be used to activate the shield.


The documentation for this class was generated from the following file: