Leviathan  0.8.0.0
Leviathan game engine
Leviathan::FloatEventData Class Reference

Data for EVENT_TYPE_ENGINE_TICK and all others that have only int data. More...

#include <Event.h>

+ Inheritance diagram for Leviathan::FloatEventData:

Public Member Functions

DLLEXPORT FloatEventData (float elapsed)
 Loads from a packet. More...
 
DLLEXPORT FloatEventData (sf::Packet &packet)
 
virtual void AddDataToPacket (sf::Packet &packet)
 Adds this to a packet for retrieving it later. More...
 
- Public Member Functions inherited from Leviathan::BaseEventData
virtual ~BaseEventData ()
 

Public Attributes

float FloatDataValue
 Current engine tick count. More...
 

Detailed Description

Data for EVENT_TYPE_ENGINE_TICK and all others that have only int data.

Definition at line 90 of file Event.h.

Constructor & Destructor Documentation

◆ FloatEventData() [1/2]

DLLEXPORT Leviathan::FloatEventData::FloatEventData ( float  elapsed)

Loads from a packet.

Definition at line 171 of file Event.cpp.

171 : FloatDataValue(elapsed) {}
float FloatDataValue
Current engine tick count.
Definition: Event.h:102

◆ FloatEventData() [2/2]

DLLEXPORT Leviathan::FloatEventData::FloatEventData ( sf::Packet &  packet)

Definition at line 156 of file Event.cpp.

157 {
158 
159  packet >> FloatDataValue;
160 
161  if(!packet)
162  throw InvalidArgument("packet has invalid format");
163 }
float FloatDataValue
Current engine tick count.
Definition: Event.h:102

Member Function Documentation

◆ AddDataToPacket()

void Leviathan::FloatEventData::AddDataToPacket ( sf::Packet &  packet)
virtual

Adds this to a packet for retrieving it later.

Implements Leviathan::BaseEventData.

Definition at line 165 of file Event.cpp.

166 {
167  packet << FloatDataValue;
168 }
float FloatDataValue
Current engine tick count.
Definition: Event.h:102

Member Data Documentation

◆ FloatDataValue

float Leviathan::FloatEventData::FloatDataValue

Current engine tick count.

Definition at line 102 of file Event.h.


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