MouseController (component)#

This component is the base class for custom classes that handle mouse inputs, when clicking a player or hovering over it.

Contents:

struct MouseController : public Component#

Subclassed by MouseTest

Public Functions

inline MouseController()#
inline virtual void init() override#
inline void get_components()#

Function for getting the Transform and Sprite components. This is separate from the init function in case the MouseController is defined before those other components and we have to get them later.

void handle_events()#
inline virtual void on_hover()#
inline virtual void on_left_click()#
inline virtual void on_right_click()#
inline virtual void on_left_click_end()#
inline virtual void on_right_click_end()#

Public Members

Transform *transform#
Sprite *sprite#
Collider *collider#