Show / Hide Table of Contents

Class LaserEmitter

Used for playing laser animations and other effects on a Laser.

Inheritance
object
Object
Component
Behaviour
MonoBehaviour
LaserEmitter
Namespace: WeaverCore.Components
Assembly: WeaverCore.dll
Syntax
public class LaserEmitter : MonoBehaviour

Properties

| Edit this page View Source

ChargeUpDuration

Declaration
public float ChargeUpDuration { get; set; }
Property Value
Type Description
float
| Edit this page View Source

EndDuration

Duration of the laser ending animation

Declaration
public float EndDuration { get; }
Property Value
Type Description
float
| Edit this page View Source

FireDuration

Declaration
public float FireDuration { get; set; }
Property Value
Type Description
float
| Edit this page View Source

FiringLaser

Is the laser currently being fired?

Declaration
public bool FiringLaser { get; }
Property Value
Type Description
bool
| Edit this page View Source

Laser

The laser component used for rendering the laser sprite

Declaration
public Laser Laser { get; }
Property Value
Type Description
Laser
| Edit this page View Source

MinChargeUpDuration

Gets the duration of the charge up animation

Declaration
public float MinChargeUpDuration { get; }
Property Value
Type Description
float

Methods

| Edit this page View Source

ChargeUpLaser_P1()

Starts charging up the laser. This function is useful if you want to control when the laser's events are triggered

Declaration
public float ChargeUpLaser_P1()
Returns
Type Description
float

Returns the minimum duration of the animation

| Edit this page View Source

EndLaser_P3()

Ends the laser. MUST BE CALLED AFTER FireLaser_P2(). This function is useful if you want to control when the laser's events are triggered

Declaration
public float EndLaser_P3()
Returns
Type Description
float

Returns the duration of the animation

| Edit this page View Source

FireChargeUpOnly()

Fires the charge up animation of the laser only

Declaration
public void FireChargeUpOnly()
| Edit this page View Source

FireChargeUpOnlyRoutine()

Fires the charge up animation of the laser only

Declaration
public IEnumerator FireChargeUpOnlyRoutine()
Returns
Type Description
IEnumerator
| Edit this page View Source

FireLaser()

Fires the laser

Declaration
public void FireLaser()
| Edit this page View Source

FireLaserQuick()

Fires the laser with a quick charge-up animation

Declaration
public void FireLaserQuick()
| Edit this page View Source

FireLaserQuickRoutine()

Fires the laser with a quick charge-up animation

Declaration
public IEnumerator FireLaserQuickRoutine()
Returns
Type Description
IEnumerator
| Edit this page View Source

FireLaserRoutine()

Fires the laser

Declaration
public IEnumerator FireLaserRoutine()
Returns
Type Description
IEnumerator
| Edit this page View Source

FireLaser_P2()

Fires the laser. MUST BE CALLED AFTER ChargeUpLaser_P1(). This function is useful if you want to control when the laser's events are triggered

Declaration
public float FireLaser_P2()
Returns
Type Description
float

Returns the minimum duration of the animation

| Edit this page View Source

PlayChargeUpInRoutine(float)

Fades into the charge up animation

Declaration
public IEnumerator PlayChargeUpInRoutine(float playDuration)
Parameters
Type Name Description
float playDuration

The duration of the charge-up animation

Returns
Type Description
IEnumerator
| Edit this page View Source

PlayChargeUpOutRoutine()

Fades out the charge up animation

Declaration
public IEnumerator PlayChargeUpOutRoutine()
Returns
Type Description
IEnumerator
| Edit this page View Source

StopLaser()

Stops firing the laser

Declaration
public void StopLaser()
| Edit this page View Source

StopLaserAfter(float)

Stops firing the laser after a period of time

Declaration
public void StopLaserAfter(float time)
Parameters
Type Name Description
float time

The delay before the laser is stopped

Extension Methods

ReflectionUtilities.ReflectCallMethod(object, string, object[], BindingFlags)
ReflectionUtilities.ReflectGetField(object, string, BindingFlags)
ReflectionUtilities.ReflectGetMethod(object, string, BindingFlags)
ReflectionUtilities.ReflectGetProperty(object, string, BindingFlags)
ReflectionUtilities.ReflectSetField(object, string, object, BindingFlags)
ReflectionUtilities.ReflectSetProperty(object, string, object, BindingFlags)
CoroutineUtilities.RunCoroutineWhile<T>(T, IEnumerator, Func<bool>)
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾