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

A ball that if it hits a player will not cause damage to thme but instead charge their power up meter. More...

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

Public Attributes

float chargeAmountMultiplier
 
- Public Attributes inherited from CoopBall
Color particleColor
 
CoopBallMovement ballMovement
 
float verticalRatio = .8f
 
float verticalChangeRate = .5f
 
CoopBallHitParticle hitParticleSystem
 

Protected Member Functions

override void OnAwake ()
 Called when the child class should initialize any class level references. More...
 
override void OnInit ()
 Called when the child class should initialize any class level values. More...
 
bool PlayerHit (CoopPlayer player)
 Tells the player object hit by the ball that it was hit by a ball that should give it power up charge. More...
 
- Protected Member Functions inherited from CoopBall
delegate bool PlayerHitAction (CoopPlayer player)
 
void DoNothing ()
 Used by the fixedUpdateAction when nothing should be done during the fixed update tick. More...
 
bool DoNothingAction (CoopPlayer player)
 Do nothng special when the ball hits the player and always destroy the ball. More...
 

Additional Inherited Members

- Public Member Functions inherited from CoopBall
void Awake ()
 
void Start ()
 
void Init ()
 
void FixedUpdate ()
 
void OnCollisionEnter2D (Collision2D collision)
 
void PlayHitParticle ()
 Force the ball to play the particle used when the ball hits a player. Used in cases where an external collision wants to destroy the ball, like hitting the player's shield. More...
 
void ReturnBallMovement ()
 Force the ball to return the movement controller to the object pooler. Used in cases where an external collision wants to destroy the ball, like hitting the player's shield. More...
 
- Protected Attributes inherited from CoopBall
CoopObjectPooler objectPooler
 
CommonDelegates.FixedUpdateAction fixedUpdateAction
 
PlayerHitAction playerHitAction
 

Detailed Description

A ball that if it hits a player will not cause damage to thme but instead charge their power up meter.

Member Function Documentation

◆ OnAwake()

override void CoopGoodBall.OnAwake ( )
protectedvirtual

Called when the child class should initialize any class level references.

Implements CoopBall.

◆ OnInit()

override void CoopGoodBall.OnInit ( )
protectedvirtual

Called when the child class should initialize any class level values.

Implements CoopBall.

◆ PlayerHit()

bool CoopGoodBall.PlayerHit ( CoopPlayer  player)
protected

Tells the player object hit by the ball that it was hit by a ball that should give it power up charge.

Parameters
playerPlayer that was hit by the ball.

Member Data Documentation

◆ chargeAmountMultiplier

float CoopGoodBall.chargeAmountMultiplier

The amount of charge that should be given to the player.


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