|
The Table Engine
|
Script for managing the crosshair in the game. More...
#include <crosshair_script.h>
Inheritance diagram for CrosshairScript:
Collaboration diagram for CrosshairScript:Public Member Functions | |
| void | update () override |
| Updates the position of the crosshair based on the mouse cursor. More... | |
Public Member Functions inherited from Script | |
| 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... | |
| virtual void | render () |
| Virtual method for rendering operations. Should be overridden by derived classes. More... | |
Additional Inherited Members | |
Public Attributes inherited from Script | |
| 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 for managing the crosshair in the game.
This script updates the position of the crosshair to follow the mouse cursor.
Definition at line 9 of file crosshair_script.h.
|
overridevirtual |
Updates the position of the crosshair based on the mouse cursor.
Reimplemented from Script.
Definition at line 6 of file crosshair_script.cpp.