BrainTrain
 All Classes Namespaces Files Functions Variables Macros Pages
brtr::WeaponHUD::WeaponSwitchHandler Class Reference

EventHandler for WeaponSwitching. More...

Inheritance diagram for brtr::WeaponHUD::WeaponSwitchHandler:

Public Member Functions

 WeaponSwitchHandler (Switch *switchNode)
 initializes a switch handler to switch through weapons More...
 
virtual bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
 When a mouse event is triggered, this function is called to switch between weapons. More...
 

Protected Member Functions

 ~WeaponSwitchHandler ()
 

Private Attributes

ref_ptr< Switch > _switch
 
int _curWeapon
 
unsigned int _frameNumber
 

Detailed Description

EventHandler for WeaponSwitching.

can only be obtained trough WeaponHUD::getWeaponHandler()

Author
Jonathan Spielvogel
Version
1.0
Date
2014

Definition at line 32 of file WeaponHUD.h.

Constructor & Destructor Documentation

brtr::WeaponHUD::WeaponSwitchHandler::WeaponSwitchHandler ( Switch *  switchNode)

initializes a switch handler to switch through weapons

Parameters
switchNodepointer to Switch
Returns
WeaponSwitchHandler

Definition at line 101 of file WeaponHUD.cpp.

brtr::WeaponHUD::WeaponSwitchHandler::~WeaponSwitchHandler ( )
inlineprotected

Definition at line 49 of file WeaponHUD.h.

Member Function Documentation

bool brtr::WeaponHUD::WeaponSwitchHandler::handle ( const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  aa 
)
virtual

When a mouse event is triggered, this function is called to switch between weapons.

Parameters
eaGuiEventAdapter
aaGuiActionAdapter
Returns
true, if the event was handled, otherwise false

Definition at line 106 of file WeaponHUD.cpp.

Member Data Documentation

int brtr::WeaponHUD::WeaponSwitchHandler::_curWeapon
private

Definition at line 52 of file WeaponHUD.h.

unsigned int brtr::WeaponHUD::WeaponSwitchHandler::_frameNumber
private

Definition at line 53 of file WeaponHUD.h.

ref_ptr<Switch> brtr::WeaponHUD::WeaponSwitchHandler::_switch
private

Definition at line 51 of file WeaponHUD.h.


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