Leviathan game engine
Leviathan::Sendable Class Reference

Entity is sendable to clients. More...

#include <Components.h>

+ Inheritance diagram for Leviathan::Sendable:


class  ActiveConnection

Public Member Functions

 Sendable ()
void AddConnectionToReceivers (std::shared_ptr< Connection > connection)
- 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
 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.

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 ( )

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)

Definition at line 144 of file Components.h.

145  {
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


Leviathan::Sendable::REFERENCE_HANDLE_UNCOUNTED_TYPE ( Sendable  )

Member Data Documentation


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

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: