Wing 323 - Kinect Version  V1.0
Public Member Functions
Gun Class Reference

Manages the player's gun within the game. The gun is used to shoot enemies, objects and the surrouding enviroment within the game (with each providing a different behaviour). The gun is an inventory item. More...

Inheritance diagram for Gun:
InventoryItem

List of all members.

Public Member Functions

void Start ()
 Initialises the gun's attributes.
void reload ()
 Reloads the gun.
void holsterGun ()
 Holsters the player's gun.
void drawGun ()
 Draw's the player's gun.
void positionGun ()
 Positions (and rotates) the gun to the correct orientation when the player first picks it up. The gun is placed in the player's right hand.
IEnumerator LoadNextBullet ()
 Loads the next bullet into the gun's chamber. This effectively adds a small time delay between firing, so the gun doesn't have an unlimited firing rate.
int getTotalAmmo ()
 Get's the gun's total ammo.
int getCurrentAmmoInMag ()
 Gets the gun's current ammo in the magazine.
void changeAmmo (int _numOfAmmo)
 Increments or decrements the player's total amount of ammo.

Detailed Description

Manages the player's gun within the game. The gun is used to shoot enemies, objects and the surrouding enviroment within the game (with each providing a different behaviour). The gun is an inventory item.

Author:
Alexander Poolton
Version:
7.0
Date:
27/7/2011

Member Function Documentation

int Gun::getCurrentAmmoInMag ( ) [inline]

Gets the gun's current ammo in the magazine.

Returns:
m_currentAmmoInMag Returns the current ammo in the magazine
int Gun::getTotalAmmo ( ) [inline]

Get's the gun's total ammo.

Returns:
m_totalAmmo Returns the current total ammo
IEnumerator Gun::LoadNextBullet ( ) [inline]

Loads the next bullet into the gun's chamber. This effectively adds a small time delay between firing, so the gun doesn't have an unlimited firing rate.

Returns:
yield The time it takes to load the next bullet into the chamber.

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