Quantum Engineering
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
NetworkController Class Reference

Public Member Functions

 NetworkController (PlayerController playerController)
 Network functions for multiplayer games. More...
 
void NetworkFrame ()
 Network functions called once per frame. More...
 
IEnumerator SendNetworkPlayerInfo ()
 Send information about this player once per second. More...
 
IEnumerator NetWorkWorldUpdate ()
 Updates the world over the network. More...
 
IEnumerator DedicatedServerCoroutine ()
 Saves the world for dedicated servers. More...
 
IEnumerator GetNetworkPlayers ()
 Gets information about other players from the server. More...
 
IEnumerator MoveNetworkPlayers ()
 Moves network player game objects based on database values. More...
 
IEnumerator UpdateNetworkBlocks ()
 Instantiates blocks over the network. More...
 
IEnumerator UpdateNetworkStorage ()
 Updates inventories over the network. More...
 

Public Attributes

PlayerController playerController
 
NetworkSend networkSend
 
NetworkReceive networkReceive
 
bool dedicatedServerCoroutineBusy
 
bool networkStorageCoroutineBusy
 
bool sendNetworkPlayerCoroutineBusy
 
bool getNetworkPlayersCoroutineBusy
 
bool playerMovementCoroutineBusy
 
bool networkBlockCoroutineBusy
 
bool receivedNetworkStorage
 
bool networkWorldUpdateCoroutineBusy
 
string playerData
 
string blockData
 
string storageData
 
string serverURL
 

Private Member Functions

bool NetworkAvailable ()
 Returns true if none of the network world update coroutines are running. More...
 
void UpdateNetWorkPlayer (string playerInfo, Color playerColor)
 Sends player positions to server. More...
 
void CreateNetworkPlayer (string playerName, Color playerColor)
 Instantiates a gameobject representing another player over the network. More...
 
void SetPlayerColor (GameObject player, Color playerColor)
 Sets the color of a player character. More...
 

Private Attributes

Dictionary< string, GameObject > networkPlayers
 
Dictionary< string, Vector3 > playerPositions
 
TextureDictionary textureDictionary
 
Coroutine sendNetworkPlayerCoroutine
 
Coroutine dedicatedServerCoroutine
 
Coroutine blockUpdateCoroutine
 
Coroutine storageReceiveCoroutine
 
Coroutine networkPowerCoroutine
 
Coroutine networkBlockCoroutine
 
Coroutine networkStorageCoroutine
 
Coroutine networkConduitCoroutine
 
Coroutine networkMachineCoroutine
 
Coroutine networkHubCoroutine
 
Coroutine getNetworkPlayersCoroutine
 
Coroutine networkMovementCoroutine
 
List< string > playerNames
 

Constructor & Destructor Documentation

◆ NetworkController()

NetworkController.NetworkController ( PlayerController  playerController)
inline

Network functions for multiplayer games.

Member Function Documentation

◆ CreateNetworkPlayer()

void NetworkController.CreateNetworkPlayer ( string  playerName,
Color  playerColor 
)
inlineprivate

Instantiates a gameobject representing another player over the network.

◆ DedicatedServerCoroutine()

IEnumerator NetworkController.DedicatedServerCoroutine ( )
inline

Saves the world for dedicated servers.

◆ GetNetworkPlayers()

IEnumerator NetworkController.GetNetworkPlayers ( )
inline

Gets information about other players from the server.

◆ MoveNetworkPlayers()

IEnumerator NetworkController.MoveNetworkPlayers ( )
inline

Moves network player game objects based on database values.

◆ NetworkAvailable()

bool NetworkController.NetworkAvailable ( )
inlineprivate

Returns true if none of the network world update coroutines are running.

◆ NetworkFrame()

void NetworkController.NetworkFrame ( )
inline

Network functions called once per frame.

◆ NetWorkWorldUpdate()

IEnumerator NetworkController.NetWorkWorldUpdate ( )
inline

Updates the world over the network.

◆ SendNetworkPlayerInfo()

IEnumerator NetworkController.SendNetworkPlayerInfo ( )
inline

Send information about this player once per second.

◆ SetPlayerColor()

void NetworkController.SetPlayerColor ( GameObject  player,
Color  playerColor 
)
inlineprivate

Sets the color of a player character.

◆ UpdateNetworkBlocks()

IEnumerator NetworkController.UpdateNetworkBlocks ( )
inline

Instantiates blocks over the network.

◆ UpdateNetWorkPlayer()

void NetworkController.UpdateNetWorkPlayer ( string  playerInfo,
Color  playerColor 
)
inlineprivate

Sends player positions to server.

◆ UpdateNetworkStorage()

IEnumerator NetworkController.UpdateNetworkStorage ( )
inline

Updates inventories over the network.

Member Data Documentation

◆ blockData

string NetworkController.blockData

◆ blockUpdateCoroutine

Coroutine NetworkController.blockUpdateCoroutine
private

◆ dedicatedServerCoroutine

Coroutine NetworkController.dedicatedServerCoroutine
private

◆ dedicatedServerCoroutineBusy

bool NetworkController.dedicatedServerCoroutineBusy

◆ getNetworkPlayersCoroutine

Coroutine NetworkController.getNetworkPlayersCoroutine
private

◆ getNetworkPlayersCoroutineBusy

bool NetworkController.getNetworkPlayersCoroutineBusy

◆ networkBlockCoroutine

Coroutine NetworkController.networkBlockCoroutine
private

◆ networkBlockCoroutineBusy

bool NetworkController.networkBlockCoroutineBusy

◆ networkConduitCoroutine

Coroutine NetworkController.networkConduitCoroutine
private

◆ networkHubCoroutine

Coroutine NetworkController.networkHubCoroutine
private

◆ networkMachineCoroutine

Coroutine NetworkController.networkMachineCoroutine
private

◆ networkMovementCoroutine

Coroutine NetworkController.networkMovementCoroutine
private

◆ networkPlayers

Dictionary<string, GameObject> NetworkController.networkPlayers
private

◆ networkPowerCoroutine

Coroutine NetworkController.networkPowerCoroutine
private

◆ networkReceive

NetworkReceive NetworkController.networkReceive

◆ networkSend

NetworkSend NetworkController.networkSend

◆ networkStorageCoroutine

Coroutine NetworkController.networkStorageCoroutine
private

◆ networkStorageCoroutineBusy

bool NetworkController.networkStorageCoroutineBusy

◆ networkWorldUpdateCoroutineBusy

bool NetworkController.networkWorldUpdateCoroutineBusy

◆ playerController

PlayerController NetworkController.playerController

◆ playerData

string NetworkController.playerData

◆ playerMovementCoroutineBusy

bool NetworkController.playerMovementCoroutineBusy

◆ playerNames

List<string> NetworkController.playerNames
private

◆ playerPositions

Dictionary<string, Vector3> NetworkController.playerPositions
private

◆ receivedNetworkStorage

bool NetworkController.receivedNetworkStorage

◆ sendNetworkPlayerCoroutine

Coroutine NetworkController.sendNetworkPlayerCoroutine
private

◆ sendNetworkPlayerCoroutineBusy

bool NetworkController.sendNetworkPlayerCoroutineBusy

◆ serverURL

string NetworkController.serverURL

◆ storageData

string NetworkController.storageData

◆ storageReceiveCoroutine

Coroutine NetworkController.storageReceiveCoroutine
private

◆ textureDictionary

TextureDictionary NetworkController.textureDictionary
private

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