DoopelPonger
|
A type of good ball that should charge a player's power up if it hits a player and should damage Schmitty Doop when hit. More...
Public Member Functions | |
void | Awake () |
Initialize the references needed by the MiniBall. More... | |
void | Init () |
Initialize the values needed by the MiniBall. More... | |
void | OnCollisionEnter2D (Collision2D collision) |
Checks the collision object and do specific things based on the object that collided with the ball. More... | |
void | IgnoreShield (Collider2D shieldCollider) |
When the ball hits the shield, in some situations it can hit the shield twitce and bounce back in the original direction it was traveling. We want to ignore the second collision. More... | |
Public Attributes | |
float | chargeAmountMultiplier |
The amount of charge to give the player if the ball hits the player. More... | |
float | velocity |
How fast the mini ball should move. More... | |
float | verticalRatio |
The speed.y/speed.x ratio to apply the vertical fix amount to make sure the ball is not bouncing up and down. More... | |
float | verticalFix |
The amount of speed to add to the x axis to correct the velocity if it is moving too much in the y axis. More... | |
CoopBallHitParticle | hitParticleSystem |
The particle system to play when the ball is destroyed. More... | |
int | numberOfBounces |
The number of times the mini ball has been bounced off a shield. More... | |
float | radius |
The size of the ball. More... | |
A type of good ball that should charge a player's power up if it hits a player and should damage Schmitty Doop when hit.
The mini ball can also bounce off of player shields. Each time the ball bounces it increases the amount of damage it will do to Schmitty Doop as well as increase the amount of charge to give to the player being hit.
void CoopMiniBall.Awake | ( | ) |
Initialize the references needed by the MiniBall.
void CoopMiniBall.IgnoreShield | ( | Collider2D | shieldCollider | ) |
When the ball hits the shield, in some situations it can hit the shield twitce and bounce back in the original direction it was traveling. We want to ignore the second collision.
shieldCollider | The shield that the ball hit. |
void CoopMiniBall.Init | ( | ) |
Initialize the values needed by the MiniBall.
void CoopMiniBall.OnCollisionEnter2D | ( | Collision2D | collision | ) |
Checks the collision object and do specific things based on the object that collided with the ball.
If the ball collides with Schmitty Doop, damage it. If the ball collides with a player, the player should have the power up charge increased. If the ball hits a shield it will bounce back in the opposite direction.
collision | The object that has been collided with the ball. |
float CoopMiniBall.chargeAmountMultiplier |
The amount of charge to give the player if the ball hits the player.
CoopBallHitParticle CoopMiniBall.hitParticleSystem |
The particle system to play when the ball is destroyed.
int CoopMiniBall.numberOfBounces |
The number of times the mini ball has been bounced off a shield.
float CoopMiniBall.radius |
The size of the ball.
float CoopMiniBall.velocity |
How fast the mini ball should move.
float CoopMiniBall.verticalFix |
The amount of speed to add to the x axis to correct the velocity if it is moving too much in the y axis.
float CoopMiniBall.verticalRatio |
The speed.y/speed.x ratio to apply the vertical fix amount to make sure the ball is not bouncing up and down.