Wing 323 - Gamepad Version
V1.0
|
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...
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. |
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.
IEnumerator Orc::duckAndReload | ( | string | _duckAnim, |
float | _duckAnimSpeed, | ||
float | _reloadTime | ||
) | [inline] |
The orc ducks down and reloads, when the orc runs out of ammo.
[in] | _duckAnim | The duck animation. |
[in] | _duckAnimSpeed | The speed of the duck animation. |
[in] | _reloadTime | The amount of time it takes to 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).