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

Controls what weapons are picked up, which ones are to be active and sends event accordingly. More...

Inheritance diagram for WeaponController:

Private Member Functions

void Update ()
 Checks for distance to weapons and adds them to list if they are close enough to be picked up. Checks for inputs to control which is the active weapon.
 
void AddWeapon (Weapon weapon)
 Sets the weapon up to be stored in the weapon controller.
 
void CheckForInput ()
 If input key was pressed set that to active weapon, only checks up to amount of active weapons.
 
void SetActiveWeapon (int index)
 Unequips old weapons and equips new one.
 

Detailed Description

Controls what weapons are picked up, which ones are to be active and sends event accordingly.

Definition at line 12 of file WeaponController.cs.

Member Function Documentation

◆ AddWeapon()

void AddWeapon ( Weapon weapon)
private

Sets the weapon up to be stored in the weapon controller.

Parameters
weaponWeapon to be added

Definition at line 67 of file WeaponController.cs.

◆ SetActiveWeapon()

void SetActiveWeapon ( int index)
private

Unequips old weapons and equips new one.

Parameters
indexindex for weapon

Definition at line 95 of file WeaponController.cs.


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