Wrath of Zeus
Made by Torchlight Games for CSE 125 SP24
Loading...
Searching...
No Matches
Public Member Functions | Data Fields
SharedGameState Struct Reference

The SharedGameState is a representation of the ServerGameState instance maintained by the server and is generated by the server in every timestep. It is intended only for use by the client(s). More...

#include <sharedgamestate.hpp>

Public Member Functions

 SharedGameState ()
 
 SharedGameState (GamePhase start_phase, const GameConfig &config)
 
 DEF_SERIALIZE (Archive &ar, const unsigned int version)
 
void update (const SharedGameState &update)
 

Data Fields

std::unordered_map< EntityID, boost::optional< SharedObject > > objects
 
unsigned int timestep
 
Lobby lobby
 
GamePhase phase
 
MatchPhase matchPhase
 
time_t relay_finish_time
 
bool playerVictory
 
unsigned int numPlayerDeaths
 

Detailed Description

The SharedGameState is a representation of the ServerGameState instance maintained by the server and is generated by the server in every timestep. It is intended only for use by the client(s).

Constructor & Destructor Documentation

◆ SharedGameState() [1/2]

SharedGameState::SharedGameState ( )
inline

◆ SharedGameState() [2/2]

SharedGameState::SharedGameState ( GamePhase  start_phase,
const GameConfig config 
)
inline

Member Function Documentation

◆ DEF_SERIALIZE()

SharedGameState::DEF_SERIALIZE ( Archive &  ar,
const unsigned int  version 
)
inline

◆ update()

void SharedGameState::update ( const SharedGameState update)

Updates this SharedGameState with the changes from the incoming SharedGameState

Parameters
updateNew Partial gamestate update from the server

Field Documentation

◆ lobby

Lobby SharedGameState::lobby

◆ matchPhase

MatchPhase SharedGameState::matchPhase

◆ numPlayerDeaths

unsigned int SharedGameState::numPlayerDeaths

◆ objects

std::unordered_map<EntityID, boost::optional<SharedObject> > SharedGameState::objects

◆ phase

GamePhase SharedGameState::phase

◆ playerVictory

bool SharedGameState::playerVictory

◆ relay_finish_time

time_t SharedGameState::relay_finish_time

◆ timestep

unsigned int SharedGameState::timestep

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