mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
NetworkIdentity: group fields together
This commit is contained in:
parent
e2cd6977d6
commit
ea1e571ccd
@ -43,13 +43,18 @@ public sealed class NetworkIdentity : MonoBehaviour
|
|||||||
// properties
|
// properties
|
||||||
public bool isClient { get { return m_IsClient; } }
|
public bool isClient { get { return m_IsClient; } }
|
||||||
public bool isServer { get { return m_IsServer && NetworkServer.active; } } // dont return true if server stopped.
|
public bool isServer { get { return m_IsServer && NetworkServer.active; } } // dont return true if server stopped.
|
||||||
|
public bool isLocalPlayer { get { return m_IsLocalPlayer; } }
|
||||||
public bool hasAuthority { get { return m_HasAuthority; } }
|
public bool hasAuthority { get { return m_HasAuthority; } }
|
||||||
|
|
||||||
|
public Dictionary<int, NetworkConnection> observers { get { return m_Observers; } }
|
||||||
|
|
||||||
public uint netId { get { return m_NetId; } }
|
public uint netId { get { return m_NetId; } }
|
||||||
public uint sceneId { get { return m_SceneId; } }
|
public uint sceneId { get { return m_SceneId; } }
|
||||||
public bool serverOnly { get { return m_ServerOnly; } set { m_ServerOnly = value; } }
|
public bool serverOnly { get { return m_ServerOnly; } set { m_ServerOnly = value; } }
|
||||||
public bool localPlayerAuthority { get { return m_LocalPlayerAuthority; } set { m_LocalPlayerAuthority = value; } }
|
public bool localPlayerAuthority { get { return m_LocalPlayerAuthority; } set { m_LocalPlayerAuthority = value; } }
|
||||||
public NetworkConnection clientAuthorityOwner { get { return m_ClientAuthorityOwner; }}
|
public NetworkConnection clientAuthorityOwner { get { return m_ClientAuthorityOwner; }}
|
||||||
|
public NetworkConnection connectionToServer { get { return m_ConnectionToServer; } }
|
||||||
|
public NetworkConnection connectionToClient { get { return m_ConnectionToClient; } }
|
||||||
|
|
||||||
// all spawned NetworkIdentities by netId. needed on server and client.
|
// all spawned NetworkIdentities by netId. needed on server and client.
|
||||||
public static Dictionary<uint, NetworkIdentity> spawned = new Dictionary<uint, NetworkIdentity>();
|
public static Dictionary<uint, NetworkIdentity> spawned = new Dictionary<uint, NetworkIdentity>();
|
||||||
@ -135,12 +140,6 @@ internal void ForceAuthority(bool authority)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool isLocalPlayer { get { return m_IsLocalPlayer; } }
|
|
||||||
public NetworkConnection connectionToServer { get { return m_ConnectionToServer; } }
|
|
||||||
public NetworkConnection connectionToClient { get { return m_ConnectionToClient; } }
|
|
||||||
|
|
||||||
public Dictionary<int, NetworkConnection> observers { get { return m_Observers; } }
|
|
||||||
|
|
||||||
static uint s_NextNetworkId = 1;
|
static uint s_NextNetworkId = 1;
|
||||||
internal static uint GetNextNetworkId()
|
internal static uint GetNextNetworkId()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user