Nymph Game Engine
Chaiscript based Game Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Utility::ToggleLayerEvent Class Reference

Class for toggle layer event. More...

#include <toggle_layer_event.h>

Inheritance diagram for Utility::ToggleLayerEvent:
Events::Event

Public Member Functions

 ToggleLayerEvent (const unsigned int layer_number, const bool on)
 ToggleLayerEvent Constructor. More...
 
bool turnOn () const noexcept
 Turn the layer on? More...
 
unsigned int getLayerNumber () const noexcept
 Gets the layer number. More...
 
- Public Member Functions inherited from Events::Event
 Event (const EventType &type)
 Event constructor. More...
 
EventType getEventType () const
 Gets the event type. More...
 

Static Public Member Functions

static std::shared_ptr
< ToggleLayerEvent
create (const unsigned int layer_number, const bool on)
 Factory function. More...
 

Detailed Description

Class for toggle layer event.

Constructor & Destructor Documentation

Utility::ToggleLayerEvent::ToggleLayerEvent ( const unsigned int  layer_number,
const bool  on 
)
inline

ToggleLayerEvent Constructor.

Parameters
[in]layer_numberThe layer number
[in]onLayer on or off

Member Function Documentation

static std::shared_ptr<ToggleLayerEvent> Utility::ToggleLayerEvent::create ( const unsigned int  layer_number,
const bool  on 
)
inlinestatic

Factory function.

Parameters
[in]layer_numberThe layer number
[in]onLayer on or off
Returns
newly created ToggleLayerEvent

Referenced by generated::getToggleLayerEventModule(), and Utility::DebugParser::parseCommand().

unsigned int Utility::ToggleLayerEvent::getLayerNumber ( ) const
inlinenoexcept

Gets the layer number.

Returns
The layer number.

Referenced by generated::getToggleLayerEventModule().

bool Utility::ToggleLayerEvent::turnOn ( ) const
inlinenoexcept

Turn the layer on?

Returns
True if yes

Referenced by generated::getToggleLayerEventModule().


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