DoopelPonger
|
The cannon object attached to the player when the laser power up is used. More...
Public Member Functions | |
void | Awake () |
Set up references needed by the cannon. More... | |
void | Init () |
Initialize the values in the cannon before it is used. More... | |
void | FixedUpdate () |
Rotate the cannon based on the user input. More... | |
void | DespawnCannon (System.Action callback) |
Trigger the the cannon despawning and make sure the laser stops shooting. More... | |
Public Attributes | |
Transform | rotationTransform |
Transform | laserSpawnLocation |
CoopPlayerLaser | playerLaserPrefab |
int | laserDirectionMultiplier |
float | movementRate |
Range | rotationRange |
Vector3 | desiredScaled |
CoopPlayer | player |
The cannon object attached to the player when the laser power up is used.
This class takes the input away from the paddle and uses it to adjust the angle of the cannon barrel.
void CoopPlayerLaserCannon.Awake | ( | ) |
Set up references needed by the cannon.
void CoopPlayerLaserCannon.DespawnCannon | ( | System.Action | callback | ) |
Trigger the the cannon despawning and make sure the laser stops shooting.
callback | The method that needs to be notified when the animation is done. Just passes it through to the laser animator. |
void CoopPlayerLaserCannon.FixedUpdate | ( | ) |
Rotate the cannon based on the user input.
void CoopPlayerLaserCannon.Init | ( | ) |
Initialize the values in the cannon before it is used.
Vector3 CoopPlayerLaserCannon.desiredScaled |
The scale of the cannon once it is a child of the player.
int CoopPlayerLaserCannon.laserDirectionMultiplier |
The direction on the x axis the laser should fire.
Transform CoopPlayerLaserCannon.laserSpawnLocation |
The position the laser should originate from.
float CoopPlayerLaserCannon.movementRate |
How fast the laser should rotate.
CoopPlayer CoopPlayerLaserCannon.player |
The player the cannon is attached to.
CoopPlayerLaser CoopPlayerLaserCannon.playerLaserPrefab |
The laser prefab used to attack schmitty doop or heal the player.
Range CoopPlayerLaserCannon.rotationRange |
The boundaries of the cannon's rotation.
Transform CoopPlayerLaserCannon.rotationTransform |
The transform that should be rotated when the player presses the move up/down keys.