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

A raycast attack from the player. A ray is fired from the end of a barrel and tries to find something to hit. If Schmitty Doop is hit, then damage is applied. If a player is found, then a charge is applied. More...

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

Public Member Functions

void Awake ()
 Initialize the references needed by the laser. More...
 
void FireLaser ()
 Method to start the process of firing the laser. Once this method is called, the laser will be in fully automatic, always firing at the attackInterval rate until StopLaser is called. More...
 
void StopLaser ()
 Stop the laser from firing and being drawn on the screen. More...
 
void FixedUpdate ()
 Fire the laser, or wait until it is time to fire again. More...
 

Public Attributes

float length
 
float width
 
LayerMask layerMask
 
int numberOfPoints
 
float attackInterval
 
float laserOnScreenTime
 
int laserDirectionMultiplier
 
CoopLaserHitParticle laserHitParticlePrefab
 
float chargeAmountMultiplier
 
float damageMultiplier
 
CoopPlayerLaserAnimator animator
 

Detailed Description

A raycast attack from the player. A ray is fired from the end of a barrel and tries to find something to hit. If Schmitty Doop is hit, then damage is applied. If a player is found, then a charge is applied.

Member Function Documentation

◆ Awake()

void CoopPlayerLaser.Awake ( )

Initialize the references needed by the laser.

◆ FireLaser()

void CoopPlayerLaser.FireLaser ( )

Method to start the process of firing the laser. Once this method is called, the laser will be in fully automatic, always firing at the attackInterval rate until StopLaser is called.

◆ FixedUpdate()

void CoopPlayerLaser.FixedUpdate ( )

Fire the laser, or wait until it is time to fire again.

◆ StopLaser()

void CoopPlayerLaser.StopLaser ( )

Stop the laser from firing and being drawn on the screen.

Member Data Documentation

◆ animator

CoopPlayerLaserAnimator CoopPlayerLaser.animator

◆ attackInterval

float CoopPlayerLaser.attackInterval

The delay between firing the raycast and looking for targets to hit.

◆ chargeAmountMultiplier

float CoopPlayerLaser.chargeAmountMultiplier

◆ damageMultiplier

float CoopPlayerLaser.damageMultiplier

◆ laserDirectionMultiplier

int CoopPlayerLaser.laserDirectionMultiplier

◆ laserHitParticlePrefab

CoopLaserHitParticle CoopPlayerLaser.laserHitParticlePrefab

◆ laserOnScreenTime

float CoopPlayerLaser.laserOnScreenTime

The raycast to check for targets is only one frame long, but drawing the laser should be longer so that the player can actually see the attack. This is the amount of time the line renderer should stay active on the screen.

◆ layerMask

LayerMask CoopPlayerLaser.layerMask

The layers to look for when raycasting.

◆ length

float CoopPlayerLaser.length

The max length to fire the laser.

◆ numberOfPoints

int CoopPlayerLaser.numberOfPoints

The number of points in the line renderer. More than two points are used to make the laser look more shaky, rather than a true laser being just two points.

◆ width

float CoopPlayerLaser.width

The width of the laser, Used to draw the laser not for ray casting.


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