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

Is essentially a glorified health bar for the player. More...

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

Public Member Functions

void Awake ()
 
void OnDestroy ()
 

Public Attributes

Material [] materials
 

Detailed Description

Is essentially a glorified health bar for the player.

Each time the player hit event is fired, this class listens and decreases the health of the player. Once the player's health gets to 0 the player death event will be fired. To number of hit points the player has is determined by the number of meterials provided. If the player has 3 hit points, the materials array should have 3 elements. As the player gets hit, the next material will be switched out. This is used to make the players look beat up when they take damage.

Member Function Documentation

◆ Awake()

void CoopPlayerPaddleHealth.Awake ( )

Initialize all references needed by the paddle health class.

◆ OnDestroy()

void CoopPlayerPaddleHealth.OnDestroy ( )

remove the links to the EventManager whe the player dies.

Member Data Documentation

◆ materials

Material [] CoopPlayerPaddleHealth.materials

The materials to use for the paddle. Each time the player gets hit the next material in the array will be used.


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