3 #include "Component.hpp"
8 static int nextNetworkId;
11 unsigned int _networkId;
30 void setNetworkId(
unsigned int networkId) { _networkId = networkId; }
55 bool isLocal()
const {
return !_isServer && !_isClient; }
Definition: NetworkIdentity.hpp:6
bool isServer() const
Returns true if NetworkServer.isActive and server is not stopped.
Definition: NetworkIdentity.hpp:45
bool isClient() const
Returns true if running as a client and this object was spawned by a server.
Definition: NetworkIdentity.hpp:50
void setAuthority(bool authority)
Set the authority of this object.
Definition: NetworkIdentity.hpp:40
void setNetworkId(unsigned int networkId)
Set the network Id of this object. (warning: set manually only if you know what you are doing)
Definition: NetworkIdentity.hpp:30
Definition: Component.hpp:38
bool hasAuthority() const
True on client if that component has been assigned to the client.
Definition: NetworkIdentity.hpp:35
unsigned int getNetworkId() const
The unique network Id of this object (unique at runtime).
Definition: NetworkIdentity.hpp:24
bool isLocal() const
Returns true if running on local. (not spawned by server or client)
Definition: NetworkIdentity.hpp:55