Leviathan  0.8.0.0
Leviathan game engine
Leviathan::SendableSystem Class Reference

Sends updated entities from server to clients. More...

#include <Systems.h>

Public Member Functions

void Run (std::unordered_map< ObjectID, Sendable *> &index, GameWorld &world)
 

Protected Member Functions

DLLEXPORT void HandleNode (ObjectID id, Sendable &obj, GameWorld &world)
 

Detailed Description

Sends updated entities from server to clients.

Todo:
Change this to take distance into account don't send as many updates to clients far away

Definition at line 131 of file Systems.h.

Member Function Documentation

◆ HandleNode()

DLLEXPORT void Leviathan::SendableSystem::HandleNode ( ObjectID  id,
Sendable obj,
GameWorld world 
)
protected

Definition at line 133 of file Systems.cpp.

134  {DEBUG_BREAK}

◆ Run()

void Leviathan::SendableSystem::Run ( std::unordered_map< ObjectID, Sendable *> &  index,
GameWorld world 
)
inline
Precondition
Final states for entities have been created for current tick

Definition at line 134 of file Systems.h.

135  {
136 
137  for(auto iter = index.begin(); iter != index.end(); ++iter) {
138 
139  auto& node = *iter->second;
140 
141  if(!node.Marked)
142  continue;
143 
144  HandleNode(iter->first, node, world);
145 
146  node.Marked = false;
147  }
148  }
DLLEXPORT void HandleNode(ObjectID id, Sendable &obj, GameWorld &world)
Definition: Systems.cpp:133

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