Leviathan  0.8.0.0
Leviathan game engine
Leviathan::Sendable Class Reference

Entity is sendable to clients. More...

#include <Components.h>

+ Inheritance diagram for Leviathan::Sendable:

Classes

class  ActiveConnection
 

Public Member Functions

 Sendable ()
 
void AddConnectionToReceivers (std::shared_ptr< Connection > connection)
 
 REFERENCE_HANDLE_UNCOUNTED_TYPE (Sendable)
 
- Public Member Functions inherited from Leviathan::Component
 Component (COMPONENT_TYPE type)
 
 Component (const Component &)=delete
 
Componentoperator= (const Component &)=delete
 

Public Attributes

std::vector< std::shared_ptr< ActiveConnection > > UpdateReceivers
 Clients we have already sent a state to. More...
 
- Public Attributes inherited from Leviathan::Component
bool Marked
 
const COMPONENT_TYPE Type
 Type of this component, used for network serialization. More...
 

Static Public Attributes

static constexpr auto TYPE = COMPONENT_TYPE::Sendable
 

Detailed Description

Entity is sendable to clients.

Note
This will only be in the entity on the server

Definition at line 98 of file Components.h.

Constructor & Destructor Documentation

◆ Sendable()

Leviathan::Sendable::Sendable ( )
inline

Definition at line 142 of file Components.h.

142 : Component(TYPE) {}
Component(COMPONENT_TYPE type)
Definition: Component.h:55
static constexpr auto TYPE
Definition: Components.h:155

Member Function Documentation

◆ AddConnectionToReceivers()

void Leviathan::Sendable::AddConnectionToReceivers ( std::shared_ptr< Connection connection)
inline

Definition at line 144 of file Components.h.

145  {
146 
147  UpdateReceivers.push_back(std::make_shared<ActiveConnection>(connection));
148  }
std::vector< std::shared_ptr< ActiveConnection > > UpdateReceivers
Clients we have already sent a state to.
Definition: Components.h:153

◆ REFERENCE_HANDLE_UNCOUNTED_TYPE()

Leviathan::Sendable::REFERENCE_HANDLE_UNCOUNTED_TYPE ( Sendable  )

Member Data Documentation

◆ TYPE

constexpr auto Leviathan::Sendable::TYPE = COMPONENT_TYPE::Sendable
static

Definition at line 155 of file Components.h.

◆ UpdateReceivers

std::vector<std::shared_ptr<ActiveConnection> > Leviathan::Sendable::UpdateReceivers

Clients we have already sent a state to.

Definition at line 153 of file Components.h.


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