Weapon base class to hold all information and basic functions for a weapon mechanic.
More...
|
virtual void | Equip () |
| Equips weapon and subcribes to fireAction.
|
|
virtual void | UnEquip () |
| Unequips and un-subscribes to fireAction.
|
|
|
virtual void | Update () |
| Updates cooldown and controls input for invoking fireAction.
|
|
virtual void | Fire () |
| Base function for Fire, should be overriden to control what happens on fire.
|
|
virtual void | DealDamage (Health health, Vector2 direction) |
| If weapon hits: this function removes health from the Health component provided.
|
|
virtual bool | CanFire () |
| function for if the cooldown has elapsed
|
|
Weapon base class to hold all information and basic functions for a weapon mechanic.
Definition at line 11 of file Weapon.cs.
◆ CanFire()
function for if the cooldown has elapsed
- Returns
- true if cooldown has elapsed
Definition at line 83 of file Weapon.cs.
◆ DealDamage()
virtual void DealDamage |
( |
Health | health, |
|
|
Vector2 | direction ) |
|
protectedvirtual |
If weapon hits: this function removes health from the Health component provided.
- Parameters
-
health | Health component to deal damage to |
direction | direction hit came from, put to (0,0) if no knockback is desired |
Definition at line 67 of file Weapon.cs.
The documentation for this class was generated from the following file:
- C:/Users/christian.backstrom/Documents/Unity/FCV/FCV-Engine/Assets/Scripts/Weapons/Melee/Weapon.cs