DoopelPonger
Public Member Functions | Public Attributes | List of all members
CoopPlayerLaserCannon Class Reference

The cannon object attached to the player when the laser power up is used. More...

Inheritance diagram for CoopPlayerLaserCannon:
Inheritance graph
[legend]
Collaboration diagram for CoopPlayerLaserCannon:
Collaboration graph
[legend]

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
 

Detailed Description

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.

Member Function Documentation

◆ Awake()

void CoopPlayerLaserCannon.Awake ( )

Set up references needed by the cannon.

◆ DespawnCannon()

void CoopPlayerLaserCannon.DespawnCannon ( System.Action  callback)

Trigger the the cannon despawning and make sure the laser stops shooting.

Parameters
callbackThe method that needs to be notified when the animation is done. Just passes it through to the laser animator.

◆ FixedUpdate()

void CoopPlayerLaserCannon.FixedUpdate ( )

Rotate the cannon based on the user input.

◆ Init()

void CoopPlayerLaserCannon.Init ( )

Initialize the values in the cannon before it is used.

Member Data Documentation

◆ desiredScaled

Vector3 CoopPlayerLaserCannon.desiredScaled

The scale of the cannon once it is a child of the player.

◆ laserDirectionMultiplier

int CoopPlayerLaserCannon.laserDirectionMultiplier

The direction on the x axis the laser should fire.

◆ laserSpawnLocation

Transform CoopPlayerLaserCannon.laserSpawnLocation

The position the laser should originate from.

◆ movementRate

float CoopPlayerLaserCannon.movementRate

How fast the laser should rotate.

◆ player

CoopPlayer CoopPlayerLaserCannon.player

The player the cannon is attached to.

◆ playerLaserPrefab

CoopPlayerLaser CoopPlayerLaserCannon.playerLaserPrefab

The laser prefab used to attack schmitty doop or heal the player.

◆ rotationRange

Range CoopPlayerLaserCannon.rotationRange

The boundaries of the cannon's rotation.

◆ rotationTransform

Transform CoopPlayerLaserCannon.rotationTransform

The transform that should be rotated when the player presses the move up/down keys.


The documentation for this class was generated from the following file: