Add this class to a weapon and it'll project a laser ray towards the direction the weapon is facing
More...
|
virtual void | ShootLaser () |
| Draws the actual laser More...
|
|
virtual void | LaserActive (bool status) |
| Turns the laser on or off depending on the status passed in parameters More...
|
|
|
virtual LineRenderer | _line [get, protected set] |
|
virtual RaycastHit | _hit [get, protected set] |
|
virtual Vector3 | _origin [get, protected set] |
|
virtual Vector3 | _raycastOrigin [get, protected set] |
|
Add this class to a weapon and it'll project a laser ray towards the direction the weapon is facing
◆ Modes
the possible modes this weapon laser sight can run on, 3D by default
◆ Initialization()
virtual void MoreMountains.TopDownEngine.WeaponLaserSight.Initialization |
( |
| ) |
|
|
protectedvirtual |
On init we create our line if needed
◆ LaserActive()
virtual void MoreMountains.TopDownEngine.WeaponLaserSight.LaserActive |
( |
bool |
status | ) |
|
|
virtual |
Turns the laser on or off depending on the status passed in parameters
- Parameters
-
status | If set to true status. |
◆ LateUpdate()
virtual void MoreMountains.TopDownEngine.WeaponLaserSight.LateUpdate |
( |
| ) |
|
|
protectedvirtual |
Every frame we draw our laser
◆ ShootLaser()
virtual void MoreMountains.TopDownEngine.WeaponLaserSight.ShootLaser |
( |
| ) |
|
|
virtual |
◆ Start()
virtual void MoreMountains.TopDownEngine.WeaponLaserSight.Start |
( |
| ) |
|
|
protectedvirtual |
◆ _destination
Vector3 MoreMountains.TopDownEngine.WeaponLaserSight._destination |
|
protected |
◆ _direction
Vector3 MoreMountains.TopDownEngine.WeaponLaserSight._direction |
|
protected |
◆ _hit2D
RaycastHit2D MoreMountains.TopDownEngine.WeaponLaserSight._hit2D |
◆ _initFrame
int MoreMountains.TopDownEngine.WeaponLaserSight._initFrame |
|
protected |
◆ _laserOffset
Vector3 MoreMountains.TopDownEngine.WeaponLaserSight._laserOffset |
|
protected |
◆ _weapon
Weapon MoreMountains.TopDownEngine.WeaponLaserSight._weapon |
|
protected |
◆ _weaponPosition
Vector3 MoreMountains.TopDownEngine.WeaponLaserSight._weaponPosition |
|
protected |
◆ _weaponRotation
Quaternion MoreMountains.TopDownEngine.WeaponLaserSight._weaponRotation |
|
protected |
◆ DrawLaser
bool MoreMountains.TopDownEngine.WeaponLaserSight.DrawLaser = true |
if this is false, the laser won't be drawn
◆ LaserCollisionMask
LayerMask MoreMountains.TopDownEngine.WeaponLaserSight.LaserCollisionMask |
the collision mask containing all layers that should stop the laser
◆ LaserMaterial
Material MoreMountains.TopDownEngine.WeaponLaserSight.LaserMaterial |
the material used to render the laser
◆ LaserMaxDistance
float MoreMountains.TopDownEngine.WeaponLaserSight.LaserMaxDistance = 50 |
the maximum distance to which we should draw the laser
◆ LaserOriginOffset
Vector3 MoreMountains.TopDownEngine.WeaponLaserSight.LaserOriginOffset |
the origin of the visible laser
◆ LaserWidth
Vector2 MoreMountains.TopDownEngine.WeaponLaserSight.LaserWidth = new Vector2(0.05f, 0.05f) |
◆ Mode
whether this laser should work in 2D or 3D
◆ PerformRaycast
bool MoreMountains.TopDownEngine.WeaponLaserSight.PerformRaycast = true |
if this is false, raycasts won't be computed for this laser sight
◆ RaycastOriginOffset
Vector3 MoreMountains.TopDownEngine.WeaponLaserSight.RaycastOriginOffset |
the origin of the raycast used to detect obstacles
◆ _hit
virtual RaycastHit MoreMountains.TopDownEngine.WeaponLaserSight._hit |
|
getprotected set |
◆ _line
virtual LineRenderer MoreMountains.TopDownEngine.WeaponLaserSight._line |
|
getprotected set |
◆ _origin
virtual Vector3 MoreMountains.TopDownEngine.WeaponLaserSight._origin |
|
getprotected set |
◆ _raycastOrigin
virtual Vector3 MoreMountains.TopDownEngine.WeaponLaserSight._raycastOrigin |
|
getprotected set |
The documentation for this class was generated from the following file:
- F:/Github/Store/TopDownEngine/Assets/TopDownEngine/Common/Scripts/Characters/Weapons/WeaponLaserSight.cs