Wing 323 - Gamepad Version  V1.0
Public Member Functions
Orc Class Reference

An orc class creates and manages an orc enemy type within the game. An orc can go beserk and charge the player (a method common to all types of enemy) and addtionally has a gun which it uses to fire at the player. More...

Inheritance diagram for Orc:
Enemy

List of all members.

Public Member Functions

void Start ()
 Initialises the values for the orc.
void Update ()
 The update loop for the orc (determines the current state the orc, i.e. going beserk, dead, idle etc, based on pre-defined conditional statements, i.e. health).
void fireGun ()
 Fires the orc's gun. The orc uses a raycasting system to fire the gun, in which a ray is fired toward the player's current position. The ray is slightly offset by the orc's accuracy (which is pre-defined) therefore it may or not hit the player, or instead the enviroment around it. The orc also uses bullet effects in the fact that it can create bullet holes and sparks when hitting the surrounding enviroment.
IEnumerator LoadNextBullet ()
 Loads the next bullet into the chamber (effectively invokes a small delay between shots, so that an orc doesn't have unlimited firing rate).
void calcIsWithinFiringDist ()
 Calculates whether or not an orc is within a pre-defined firing distance.
IEnumerator duckAndReload (string _duckAnim, float _duckAnimSpeed, float _reloadTime)
 The orc ducks down and reloads, when the orc runs out of ammo.

Detailed Description

An orc class creates and manages an orc enemy type within the game. An orc can go beserk and charge the player (a method common to all types of enemy) and addtionally has a gun which it uses to fire at the player.

Author:
Alexander Poolton
Version:
5.0
Date:
25/7/2011

Member Function Documentation

IEnumerator Orc::duckAndReload ( string  _duckAnim,
float  _duckAnimSpeed,
float  _reloadTime 
) [inline]

The orc ducks down and reloads, when the orc runs out of ammo.

Parameters:
[in]_duckAnimThe duck animation.
[in]_duckAnimSpeedThe speed of the duck animation.
[in]_reloadTimeThe amount of time it takes to reload.
Returns:
yield The time it takes for the orc to duck and reload.
IEnumerator Orc::LoadNextBullet ( ) [inline]

Loads the next bullet into the chamber (effectively invokes a small delay between shots, so that an orc doesn't have 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