DoopelPonger
|
Belong to the homing missile power up. The cannons will shoot homing missiles that go after Schmitty Doop. More...
Classes | |
struct | CannonFireInfo |
Data class used to provide information about a cannon. More... | |
Public Member Functions | |
void | Awake () |
Initialize references the cannons need. More... | |
void | Init () |
Initialize the values the cannons need. More... | |
CannonFireInfo | GetNextFireInfo () |
void | DespawnCannons (System.Action animationFinishedDelegate) |
The cannons should trigger their despawn animations. More... | |
bool | IsReadyToFire () |
void | FinishedSpawnAnimation () |
Callback from the Unity Animator that says the cannons have been spawned and are ready to be used. More... | |
void | FinishDespawnAnimation () |
Callback from the Unity Animator that says the cannons have been despawned. More... | |
void | FixedUpdate () |
Make sure the scale is as expected and check to make sure the walls are not overlapping with either cannon. More... | |
Public Attributes | |
Transform | topCannonFirePosition |
BoxCollider2D | topCannonCollider |
Transform | bottomCannonFirePosition |
BoxCollider2D | bottomCannonCollider |
LayerMask | wallLayer |
Vector2 | desiredScale |
Belong to the homing missile power up. The cannons will shoot homing missiles that go after Schmitty Doop.
The cannons consist of two cannons, one on top and the other on bottom of the player. The cannons take turns firing a homing missle.
void CoopCannons.Awake | ( | ) |
Initialize references the cannons need.
void CoopCannons.DespawnCannons | ( | System.Action | animationFinishedDelegate | ) |
The cannons should trigger their despawn animations.
animationFinishedDelegate | Function that should be called once the despawn animation is finished. |
void CoopCannons.FinishDespawnAnimation | ( | ) |
Callback from the Unity Animator that says the cannons have been despawned.
void CoopCannons.FinishedSpawnAnimation | ( | ) |
Callback from the Unity Animator that says the cannons have been spawned and are ready to be used.
void CoopCannons.FixedUpdate | ( | ) |
Make sure the scale is as expected and check to make sure the walls are not overlapping with either cannon.
CannonFireInfo CoopCannons.GetNextFireInfo | ( | ) |
void CoopCannons.Init | ( | ) |
Initialize the values the cannons need.
bool CoopCannons.IsReadyToFire | ( | ) |
BoxCollider2D CoopCannons.bottomCannonCollider |
The collider of the cannon on the bottom of the player.
Transform CoopCannons.bottomCannonFirePosition |
The firing position of the cannon on the bottom of the player.
Vector2 CoopCannons.desiredScale |
The expectes scale of the cannons. The scale is needed because the cannons were designed before all power ups were placed as children of the player. So it was easier to force the scale once childed.
BoxCollider2D CoopCannons.topCannonCollider |
The collider of the cannon on top of the player.
Transform CoopCannons.topCannonFirePosition |
The firing position of the cannon on top of the player.
LayerMask CoopCannons.wallLayer |
The Unity Layer of the wall, used so that if a cannon spawns inside a wall, it can ignore the wall collider so the player can move away from the wall.