The mini cannons are two cannons that shoot good balls out of the center of the player. The two cannons are fired at the same time.
More...
The mini cannons are two cannons that shoot good balls out of the center of the player. The two cannons are fired at the same time.
◆ Awake()
void CoopMiniCannons.Awake |
( |
| ) |
|
Initialize the references needed by the cannons.
◆ DespawnCannons()
void CoopMiniCannons.DespawnCannons |
( |
System.Action |
animationFinishedDelegate | ) |
|
Start the despawn animation of the cannons.
- Parameters
-
animationFinishedDelegate | Function to call once the cannons are finished despawning. |
◆ FinishedDespawnAnimation()
void CoopMiniCannons.FinishedDespawnAnimation |
( |
| ) |
|
Callback from the Unity Animator once the cannons are fully despawned.
◆ FinishedSpawnAnimation()
void CoopMiniCannons.FinishedSpawnAnimation |
( |
| ) |
|
Callback from the Unity Animator once the cannons are fully spawned.
◆ FireAnimation()
void CoopMiniCannons.FireAnimation |
( |
| ) |
|
Tell the animator to play the animation for firing the bullets.
◆ FixedUpdate()
void CoopMiniCannons.FixedUpdate |
( |
| ) |
|
Update the scale of the cannons to match the desired scale.
◆ GetRotation()
Vector3 CoopMiniCannons.GetRotation |
( |
| ) |
|
- Returns
- The rotation the bullet use when fired. The rotation will have a small amount of jitter to it so the bullets won't fire in a straight line.
◆ Init()
void CoopMiniCannons.Init |
( |
| ) |
|
Initialize the variables in the cannon.
◆ IsReadyToFire()
bool CoopMiniCannons.IsReadyToFire |
( |
| ) |
|
- Returns
- True when the spawn animation of the cannons is finished and the cannons can start firing.
◆ ballRotation
Vector3 CoopMiniCannons.ballRotation |
The direction the balls should fire.
◆ ballRotationDelta
float CoopMiniCannons.ballRotationDelta |
A small amount of variation of the balls fired is added to make a small amount of spread.
◆ desiredScale
Vector2 CoopMiniCannons.desiredScale |
The size of the cannons once they are children of the player. The cannons were design before it was decided to make the player the parent of the cannons, so that scales end up being weird if they are not adjusted.
◆ spawnPositions
Transform [] CoopMiniCannons.spawnPositions |
The position the bullets should spawn at.
The documentation for this class was generated from the following file: