The Table Engine
|
Script to manage enemy artificial intelligence. More...
#include <enemy_ai_script.h>
Public Member Functions | |
EnemyAIScript () | |
Constructs a new Enemy AI Script object. More... | |
void | update () override |
Updates the behavior of the enemy each frame. More... | |
void | render () override |
Renders the enemy AI behavior. More... | |
![]() | |
Script () | |
Default constructor, initializes an empty script. More... | |
Script (std::string name) | |
Constructs a Script with a specified name. More... | |
virtual | ~Script () |
Virtual destructor to allow for cleanup in derived script classes. More... | |
std::string | getName () |
Retrieves the name of the script. More... | |
GameObject * | getOwner () |
Retrieves the owner GameObject of this script. More... | |
void | setOwner (GameObject *owner) |
Sets the owner of this script. More... | |
virtual void | input () |
Virtual method for handling input. Should be overridden by derived classes. More... | |
Private Attributes | |
float | m_speed = 2 |
Additional Inherited Members | |
![]() | |
std::string | m_name |
Name of the script, useful for identification or debugging. More... | |
GameObject * | m_owner |
Pointer to the GameObject that owns this script. More... | |
Script to manage enemy artificial intelligence.
Inherits from the Script class to define specific behaviors for enemy characters, like movement speed and decision-making processes.
Definition at line 18 of file enemy_ai_script.h.
EnemyAIScript::EnemyAIScript | ( | ) |
Constructs a new Enemy AI Script object.
Sets the initial speed of the enemy AI.
Definition at line 12 of file enemy_ai_script.cpp.
|
overridevirtual |
Renders the enemy AI behavior.
This method is called once per frame after the update method, and should include any rendering logic specific to the enemy AI.
Reimplemented from Script.
Definition at line 66 of file enemy_ai_script.cpp.
|
overridevirtual |
Updates the behavior of the enemy each frame.
This method is called once per frame and should include logic to determine the enemy's actions based on its surroundings and internal state.
Reimplemented from Script.
Definition at line 17 of file enemy_ai_script.cpp.
|
private |
Speed of the enemy, controls how fast it moves
Definition at line 20 of file enemy_ai_script.h.