DoopelPonger
|
Collider used to determine if a player has successfully dodged a bullet fired by Schmitty Doop. More...
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 |
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.
void CoopChargeCollector.Awake | ( | ) |
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.
collision | The object colliding with the trigger. |
void CoopChargeCollector.StretchToPoint | ( | Vector3 | desiredRightEdge | ) |
Resize the collider so that the rightEdge sits at the same position of the desiredRightEdge.
desiredRightEdge | The position that determines how big the collider should be. |
CoopPlayer CoopChargeCollector.player |
The player that would have dodged the ball if a ball is found to hit the trigger.
Transform CoopChargeCollector.rightEdge |
The edge of the box of the transform used to scale the size of the box.
PiecesTravelToController CoopChargeCollector.travelToControllerPrefab |
The prefab for the PiecesTravelToController that should take over moving the ball pieces to the player.