Xenon
A framework for cheat development.
 
Loading...
Searching...
No Matches
Game Class Reference

A class that represents the game functionality in the Xenon cheat engine. More...

#include <game.hpp>

Public Member Functions

 Game (std::shared_ptr< Xenon > pXenon, std::shared_ptr< XenonConfig > pXenonConfigs, std::shared_ptr< XenonVariables > pXenonVariables, std::vector< std::shared_ptr< CComponent > > pComponents)
 
void EnableUpdate ()
 Enable the update loop for the game.
 
void OnEvent (const std::string &eventName, const std::function< void()> &callback)
 Used to intercept the update loop of the game and update your data like targets position, health, etc.
 
void TriggerEvent (const std::string &eventName)
 Trigger the event with the given name. This will execute all the callbacks associated with the event.
 
void OnEvent (const std::string &eventName, const std::function< void(TargetProfile *target)> &callback)
 Used to intercept the update loop of the game and update your data like targets position, health, etc.
 
void TriggerEvent (const std::string &eventName, TargetProfile *target)
 Trigger the event with the given name. This will execute all the callbacks associated with the event.
 
void ClearEvent (const std::string &eventName)
 Clear the event with the given name. This will remove all the callbacks associated with the event.
 

Detailed Description

A class that represents the game functionality in the Xenon cheat engine.

Constructor & Destructor Documentation

◆ Game()

Game::Game ( std::shared_ptr< Xenon pXenon,
std::shared_ptr< XenonConfig pXenonConfigs,
std::shared_ptr< XenonVariables pXenonVariables,
std::vector< std::shared_ptr< CComponent > >  pComponents 
)
inline

Member Function Documentation

◆ ClearEvent()

void Game::ClearEvent ( const std::string &  eventName)
inline

Clear the event with the given name. This will remove all the callbacks associated with the event.

Parameters
eventNameThe name of the event to clear. (es. "Update")

◆ EnableUpdate()

void Game::EnableUpdate ( )

Enable the update loop for the game.

◆ OnEvent() [1/2]

void Game::OnEvent ( const std::string &  eventName,
const std::function< void()> &  callback 
)
inline

Used to intercept the update loop of the game and update your data like targets position, health, etc.

Parameters
eventNameThe name of the event to trigger. (es. "Update")
callbackThe callback function to execute when the event is triggered.

◆ OnEvent() [2/2]

void Game::OnEvent ( const std::string &  eventName,
const std::function< void(TargetProfile *target)> &  callback 
)
inline

Used to intercept the update loop of the game and update your data like targets position, health, etc.

Parameters
eventNameThe name of the event to trigger. (es. "Update")
callbackThe callback function to execute when the event is triggered.

◆ TriggerEvent() [1/2]

void Game::TriggerEvent ( const std::string &  eventName)
inline

Trigger the event with the given name. This will execute all the callbacks associated with the event.

Parameters
eventNameThe name of the event to trigger. (es. "Update")

◆ TriggerEvent() [2/2]

void Game::TriggerEvent ( const std::string &  eventName,
TargetProfile target 
)
inline

Trigger the event with the given name. This will execute all the callbacks associated with the event.

Parameters
eventNameThe name of the event to trigger. (es. "Update")
targetThe target profile to pass to the callback function.

The documentation for this class was generated from the following file: