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

Collider used to determine if a player has successfully dodged a bullet fired by Schmitty Doop. More...

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

Public Member Functions

void Awake ()
 
void StretchToPoint (Vector3 desiredRightEdge)
 Resize the collider so that the rightEdge sits at the same position of the desiredRightEdge. More...
 
void OnTriggerEnter2D (Collider2D collision)
 Check if the colliding object is a ball (contains the TweenToPiecesManager object) and if it does, trigger the actions necessary to give the player the power up charge. More...
 

Public Attributes

Transform rightEdge
 
CoopPlayer player
 
PiecesTravelToController travelToControllerPrefab
 

Detailed Description

Collider used to determine if a player has successfully dodged a bullet fired by Schmitty Doop.

The collider looks for CoopBadBall objects. Once a ball collides, the ball is split into TweenTo pieces and given to a PiecesTravelToController to move the pieces to the player that just dodged the bullet. Once the pieces collide with the player, that player will get a charge increase for their power up.

Member Function Documentation

◆ Awake()

void CoopChargeCollector.Awake ( )

◆ OnTriggerEnter2D()

void CoopChargeCollector.OnTriggerEnter2D ( Collider2D  collision)

Check if the colliding object is a ball (contains the TweenToPiecesManager object) and if it does, trigger the actions necessary to give the player the power up charge.

Parameters
collisionThe object colliding with the trigger.

◆ StretchToPoint()

void CoopChargeCollector.StretchToPoint ( Vector3  desiredRightEdge)

Resize the collider so that the rightEdge sits at the same position of the desiredRightEdge.

Parameters
desiredRightEdgeThe position that determines how big the collider should be.

Member Data Documentation

◆ player

CoopPlayer CoopChargeCollector.player

The player that would have dodged the ball if a ball is found to hit the trigger.

◆ rightEdge

Transform CoopChargeCollector.rightEdge

The edge of the box of the transform used to scale the size of the box.

◆ travelToControllerPrefab

PiecesTravelToController CoopChargeCollector.travelToControllerPrefab

The prefab for the PiecesTravelToController that should take over moving the ball pieces to the player.


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