Terminus
|
The AIPlayer class implements a simple artificial intelligence enemy player. More...
#include <aiplayer.h>
Public Member Functions | |
AIPlayer (World &world, Train *train, Train *enemyTrain) | |
virtual void | update () override |
Contains the AI logic and determines what to do in this frame. More... | |
Public Member Functions inherited from terminus::AbstractPlayer | |
AbstractPlayer (World &world, Train *train) | |
Camera & | camera () |
Train * | train () |
bool | hasWon () |
bool | hasLost () |
void | toggleCameraLock () |
unsigned int | selectedWagonIndex () const |
void | switchToNextWagon () |
void | switchToPreviousWagon () |
void | switchToWagon (unsigned int wagonIndex) |
virtual void | primaryAction () |
Triggers the primary action of the currently selected wagon. More... | |
virtual void | primaryActionDebug () |
Triggers the primary debug action of the currently selected wagon (typically the primary action without cooldown limitations etc.) More... | |
virtual void | animateHit () |
Protected Member Functions | |
void | switchWagon () |
Switches randomly to next or previous wagon. More... | |
void | fire () |
Finds a target wagon and fires a projectile from the currently focusedWagon in that direction. More... | |
Protected Member Functions inherited from terminus::AbstractPlayer | |
AbstractWagon * | selectedWagon () |
Protected Attributes | |
Train * | m_enemyTrain |
AbstractWagon * | m_targetEnemyWagon |
Protected Attributes inherited from terminus::AbstractPlayer | |
World & | m_world |
Camera | m_camera |
Train * | m_train |
bool | m_animationInProgress |
Timer::TimerID | m_animationTimer |
unsigned int | m_selectedWagonIndex |
The AIPlayer class implements a simple artificial intelligence enemy player.
|
protected |
Finds a target wagon and fires a projectile from the currently focusedWagon in that direction.
|
protected |
Switches randomly to next or previous wagon.
|
overridevirtual |
Contains the AI logic and determines what to do in this frame.
The AI player switches wagons when they are not usable (disabled or on cooldown), uses RepairWagons and uses WeaponWagons by firing Projectiles at randomly selected wagons of the enemy player.
Reimplemented from terminus::AbstractPlayer.
|
protected |
|
protected |