FCV Engine 0.1
A tool and framework for tutorials in game development
Loading...
Searching...
No Matches
Projectile Class Reference

Used by ranged weapon to make an object travel in direction and then invoke hit event once it collides with an object. More...

Inheritance diagram for Projectile:

Private Member Functions

void Update ()
 Controls lifetime and velocity of projectile.
 
void OnTriggerEnter2D (Collider2D other)
 Checks if Collider2D is in LayerMask and tries to get health component; invokes hitAction if checks succeeds and destroys projectiles Game Object.
 

Detailed Description

Used by ranged weapon to make an object travel in direction and then invoke hit event once it collides with an object.

Definition at line 11 of file Projectile.cs.

Member Function Documentation

◆ OnTriggerEnter2D()

void OnTriggerEnter2D ( Collider2D other)
private

Checks if Collider2D is in LayerMask and tries to get health component; invokes hitAction if checks succeeds and destroys projectiles Game Object.

Parameters
otherCollider2D

Definition at line 45 of file Projectile.cs.


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