Added isOwner to NetworkedBehaviour

This commit is contained in:
Albin Corén 2018-03-05 15:25:49 +01:00
parent 387a98883a
commit 1fe6a74ad6
3 changed files with 10 additions and 3 deletions

View File

@ -35,6 +35,13 @@ namespace MLAPI
return NetworkingManager.singleton.isHost;
}
}
protected bool isOwner
{
get
{
return networkedObject.isOwner;
}
}
public NetworkedObject networkedObject
{
get

View File

@ -26,7 +26,7 @@ namespace MLAPI
}
}
public bool IsOwner
public bool isOwner
{
get
{

View File

@ -57,7 +57,7 @@ namespace MLAPI
{
get
{
return networkedObject.IsOwner || isLocalPlayer;
return isOwner || isLocalPlayer;
}
}
@ -315,7 +315,7 @@ namespace MLAPI
public void SetTrigger(int hash)
{
if (isLocalPlayer || networkedObject.IsOwner)
if (isLocalPlayer || isOwner)
{
using (MemoryStream stream = new MemoryStream())
{