C# 클래스 BeardedManStudios.Network.SimpleNetworkedMonoBehavior

상속: UnityEngine.MonoBehaviour, INetworkingSerialized
파일 보기 프로젝트 열기: drakelinglabs/unityarmada 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
allowOwnershipChange bool
destroyOnDisconnect bool
dontDestroyOnLoad bool
networkedBehaviors SimpleNetworkedMonoBehavior>.Dictionary
networkedBehaviorsMutex object

보호된 프로퍼티들

프로퍼티 타입 설명
rpcStack List

공개 메소드들

메소드 설명
AuthoritativeRPC ( string methodName, BeardedManStudios.Network.NetWorker socket, NetworkingPlayer player, bool runOnServer ) : void

Used for the server to call an RPC method on a NetWorker(Socket) on a particular player

AuthoritativeURPC ( string methodName, BeardedManStudios.Network.NetWorker socket, NetworkingPlayer player, bool runOnServer ) : void

Used for the server to call an URPC method on a NetWorker(Socket) on a particular player

ChangeOwner ( ulong newOwnerPlayerId ) : void
Cleanup ( ) : void
Deserialize ( NetworkingStream stream ) : void

Deserialize the Networking Stream

Disconnect ( ) : void

Used to do final cleanup when disconnecting. This gets called currently on application quit and scene resets

ExecuteRPCStack ( ) : void
GenerateUniqueId ( ) : ulong

Get a generated Unique ID for the next simple networked mono behavior or its derivitive

GetRPC ( int id ) : MethodInfo
GetSceneNetworkedId ( ) : int
Initialize ( BeardedManStudios.Network.NetWorker socket ) : void

An initial setup to make sure that a networking manager exists before running any core logic

InvokeRPC ( NetworkingStreamRPC stream ) : bool

To Invoke an RPC on a given Networking Stream RPC

Locate ( ulong id ) : SimpleNetworkedMonoBehavior

Locate a Simple Networked Monobehavior given a ID

NetworkDestroy ( ulong networkId ) : bool

Destroy a Simple Networked Monobehavior or any of its derivitives with the given Network ID

OfflineStart ( ) : void
QueueRPCForInstantiate ( ulong id, NetworkingStream stream ) : void
RPC ( string methodName ) : void

Call an RPC method with arguments

RPC ( string methodName, BeardedManStudios.Network.NetWorker socket ) : void

Call an RPC method with a NetWorker(Socket) and arguments

RPC ( string methodName, BeardedManStudios.Network.NetWorker socket, NetworkReceivers receivers ) : void

Call an RPC method on a NetWorker(Socket) with receivers and arguments

RPC ( string methodName, NetworkReceivers rpcMode ) : void

Call an RPC method with a receiver and arguments

ResetAll ( ) : void
ResetBufferClear ( ) : void

Resets the buffer to be clear again so that it can start buffering

ResetForScene ( List skip ) : void
Serialized ( ) : BMSByte

Serialize the Simple Networked Monobehavior

SetSceneNetworkedId ( int id ) : void
Setup ( BeardedManStudios.Network.NetWorker owningSocket, bool isOwner, ulong networkId, ulong ownerId ) : void

Setup the Simple Networked Monobehavior stack with a NetWorker, owner, network id, and owner id

Setup ( BeardedManStudios.Network.NetWorker owningSocket, bool isOwner, ulong networkId, ulong ownerId, bool isSceneObject = false ) : void
SetupObjects ( SimpleNetworkedMonoBehavior behaviors, BeardedManStudios.Network.NetWorker owningSocket ) : void

Setup the Simple Networked Monobehavior stack with a NetWorker

URPC ( string methodName, BeardedManStudios.Network.NetWorker socket, NetworkReceivers receivers ) : void

Call an Unreliable RPC method on a NetWorker(Socket) with receivers and arguments

URPC ( string methodName, NetworkReceivers rpcMode ) : void

Call an Unreliable RPC method with a receiver and arguments

보호된 메소드들

메소드 설명
NetworkDisconnect ( ) : void
NetworkStart ( ) : void

A start method that is called after the object has been setup on the network

NonOwnerFixedUpdate ( ) : void
NonOwnerUpdate ( ) : void
OnApplicationQuit ( ) : void
OnDestroy ( ) : void
OwnerFixedUpdate ( ) : void
OwnerUpdate ( ) : void
Reflect ( ) : void

Get the RPC's of the simple networked monobehavior

UnityFixedUpdate ( ) : void
UnityUpdate ( ) : void

비공개 메소드들

메소드 설명
AssignNewOwner ( ulong newOwnerPlayerId ) : void
AuthRPC ( string methodName, BeardedManStudios.Network.NetWorker socket, NetworkingPlayer player, bool runOnServer, string uniqueIdentifier, bool reliable ) : void
DelayedInitialize ( BeardedManStudios.Network.NetWorker socket ) : void
DoOwnerFixedUpdate ( ) : void
DoOwnerUpdate ( ) : void
GetStreamRPC ( string methodName, NetworkReceivers receivers ) : int

Creates a network stream for the method with the specified string name and returns the method info

ServerChangeOwner ( ulong newOwnerPlayerId ) : void
ThrowNetworkerException ( ) : void

메소드 상세

AuthoritativeRPC() 공개 메소드

Used for the server to call an RPC method on a NetWorker(Socket) on a particular player
public AuthoritativeRPC ( string methodName, BeardedManStudios.Network.NetWorker socket, NetworkingPlayer player, bool runOnServer ) : void
methodName string Method(Function) name to call
socket BeardedManStudios.Network.NetWorker The NetWorker(Socket) being used
player NetworkingPlayer The NetworkingPlayer who will execute this RPC
runOnServer bool
리턴 void

AuthoritativeURPC() 공개 메소드

Used for the server to call an URPC method on a NetWorker(Socket) on a particular player
public AuthoritativeURPC ( string methodName, BeardedManStudios.Network.NetWorker socket, NetworkingPlayer player, bool runOnServer ) : void
methodName string Method(Function) name to call
socket BeardedManStudios.Network.NetWorker The NetWorker(Socket) being used
player NetworkingPlayer The NetworkingPlayer who will execute this RPC
runOnServer bool
리턴 void

ChangeOwner() 공개 메소드

public ChangeOwner ( ulong newOwnerPlayerId ) : void
newOwnerPlayerId ulong
리턴 void

Cleanup() 공개 메소드

public Cleanup ( ) : void
리턴 void

Deserialize() 공개 메소드

Deserialize the Networking Stream
public Deserialize ( NetworkingStream stream ) : void
stream NetworkingStream Stream to be deserialized
리턴 void

Disconnect() 공개 메소드

Used to do final cleanup when disconnecting. This gets called currently on application quit and scene resets
public Disconnect ( ) : void
리턴 void

ExecuteRPCStack() 공개 메소드

public ExecuteRPCStack ( ) : void
리턴 void

GenerateUniqueId() 공개 정적인 메소드

Get a generated Unique ID for the next simple networked mono behavior or its derivitive
public static GenerateUniqueId ( ) : ulong
리턴 ulong

GetRPC() 공개 메소드

public GetRPC ( int id ) : MethodInfo
id int
리턴 System.Reflection.MethodInfo

GetSceneNetworkedId() 공개 메소드

public GetSceneNetworkedId ( ) : int
리턴 int

Initialize() 공개 정적인 메소드

An initial setup to make sure that a networking manager exists before running any core logic
public static Initialize ( BeardedManStudios.Network.NetWorker socket ) : void
socket BeardedManStudios.Network.NetWorker
리턴 void

InvokeRPC() 공개 메소드

To Invoke an RPC on a given Networking Stream RPC
public InvokeRPC ( NetworkingStreamRPC stream ) : bool
stream NetworkingStreamRPC Networking Stream RPC to read from
리턴 bool

Locate() 공개 정적인 메소드

Locate a Simple Networked Monobehavior given a ID
public static Locate ( ulong id ) : SimpleNetworkedMonoBehavior
id ulong ID of the Simple Networked Monobehavior
리턴 SimpleNetworkedMonoBehavior

NetworkDestroy() 공개 정적인 메소드

Destroy a Simple Networked Monobehavior or any of its derivitives with the given Network ID
public static NetworkDestroy ( ulong networkId ) : bool
networkId ulong Network ID to be destroyed
리턴 bool

NetworkDisconnect() 보호된 메소드

protected NetworkDisconnect ( ) : void
리턴 void

NetworkStart() 보호된 메소드

A start method that is called after the object has been setup on the network
protected NetworkStart ( ) : void
리턴 void

NonOwnerFixedUpdate() 보호된 메소드

protected NonOwnerFixedUpdate ( ) : void
리턴 void

NonOwnerUpdate() 보호된 메소드

protected NonOwnerUpdate ( ) : void
리턴 void

OfflineStart() 공개 메소드

public OfflineStart ( ) : void
리턴 void

OnApplicationQuit() 보호된 메소드

protected OnApplicationQuit ( ) : void
리턴 void

OnDestroy() 보호된 메소드

protected OnDestroy ( ) : void
리턴 void

OwnerFixedUpdate() 보호된 메소드

protected OwnerFixedUpdate ( ) : void
리턴 void

OwnerUpdate() 보호된 메소드

protected OwnerUpdate ( ) : void
리턴 void

QueueRPCForInstantiate() 공개 정적인 메소드

public static QueueRPCForInstantiate ( ulong id, NetworkingStream stream ) : void
id ulong
stream NetworkingStream
리턴 void

RPC() 공개 메소드

Call an RPC method with arguments
public RPC ( string methodName ) : void
methodName string Method(Function) name to call
리턴 void

RPC() 공개 메소드

Call an RPC method with a NetWorker(Socket) and arguments
public RPC ( string methodName, BeardedManStudios.Network.NetWorker socket ) : void
methodName string Method(Function) name to call
socket BeardedManStudios.Network.NetWorker The NetWorker(Socket) being used
리턴 void

RPC() 공개 메소드

Call an RPC method on a NetWorker(Socket) with receivers and arguments
public RPC ( string methodName, BeardedManStudios.Network.NetWorker socket, NetworkReceivers receivers ) : void
methodName string Method(Function) name to call
socket BeardedManStudios.Network.NetWorker The NetWorker(Socket) being used
receivers NetworkReceivers Who shall receive the RPC
리턴 void

RPC() 공개 메소드

Call an RPC method with a receiver and arguments
public RPC ( string methodName, NetworkReceivers rpcMode ) : void
methodName string Method(Function) name to call
rpcMode NetworkReceivers Who shall receive the RPC
리턴 void

Reflect() 보호된 메소드

Get the RPC's of the simple networked monobehavior
protected Reflect ( ) : void
리턴 void

ResetAll() 공개 정적인 메소드

public static ResetAll ( ) : void
리턴 void

ResetBufferClear() 공개 메소드

Resets the buffer to be clear again so that it can start buffering
public ResetBufferClear ( ) : void
리턴 void

ResetForScene() 공개 정적인 메소드

public static ResetForScene ( List skip ) : void
skip List
리턴 void

Serialized() 공개 메소드

Serialize the Simple Networked Monobehavior
public Serialized ( ) : BMSByte
리턴 BMSByte

SetSceneNetworkedId() 공개 메소드

public SetSceneNetworkedId ( int id ) : void
id int
리턴 void

Setup() 공개 메소드

Setup the Simple Networked Monobehavior stack with a NetWorker, owner, network id, and owner id
public Setup ( BeardedManStudios.Network.NetWorker owningSocket, bool isOwner, ulong networkId, ulong ownerId ) : void
owningSocket BeardedManStudios.Network.NetWorker The NetWorker to be setup with
isOwner bool If this object is the owner
networkId ulong The NetworkID for this Simple Networked Monobehavior
ownerId ulong The OwnerID for this Simple Networked Monobehavior
리턴 void

Setup() 공개 메소드

public Setup ( BeardedManStudios.Network.NetWorker owningSocket, bool isOwner, ulong networkId, ulong ownerId, bool isSceneObject = false ) : void
owningSocket BeardedManStudios.Network.NetWorker
isOwner bool
networkId ulong
ownerId ulong
isSceneObject bool
리턴 void

SetupObjects() 공개 정적인 메소드

Setup the Simple Networked Monobehavior stack with a NetWorker
public static SetupObjects ( SimpleNetworkedMonoBehavior behaviors, BeardedManStudios.Network.NetWorker owningSocket ) : void
behaviors SimpleNetworkedMonoBehavior
owningSocket BeardedManStudios.Network.NetWorker The NetWorker to be setup with
리턴 void

URPC() 공개 메소드

Call an Unreliable RPC method on a NetWorker(Socket) with receivers and arguments
public URPC ( string methodName, BeardedManStudios.Network.NetWorker socket, NetworkReceivers receivers ) : void
methodName string Method(Function) name to call
socket BeardedManStudios.Network.NetWorker The NetWorker(Socket) being used
receivers NetworkReceivers Who shall receive the RPC
리턴 void

URPC() 공개 메소드

Call an Unreliable RPC method with a receiver and arguments
public URPC ( string methodName, NetworkReceivers rpcMode ) : void
methodName string Method(Function) name to call
rpcMode NetworkReceivers Who shall receive the RPC
리턴 void

UnityFixedUpdate() 보호된 메소드

protected UnityFixedUpdate ( ) : void
리턴 void

UnityUpdate() 보호된 메소드

protected UnityUpdate ( ) : void
리턴 void

프로퍼티 상세

allowOwnershipChange 공개적으로 프로퍼티

Determines if this object has the ability to change owners
public bool allowOwnershipChange
리턴 bool

destroyOnDisconnect 공개적으로 프로퍼티

If this is true, then a network destroy will be called on disconnect
public bool destroyOnDisconnect
리턴 bool

dontDestroyOnLoad 공개적으로 프로퍼티

If this is marked as true then this object will not be cleaned up by the network on level load
public bool dontDestroyOnLoad
리턴 bool

networkedBehaviors 공개적으로 정적으로 프로퍼티

A list of all of the current networked behaviors
public static Dictionary networkedBehaviors
리턴 SimpleNetworkedMonoBehavior>.Dictionary

networkedBehaviorsMutex 공개적으로 정적으로 프로퍼티

Used for when creating new networked behaviors
public static object networkedBehaviorsMutex
리턴 object

rpcStack 보호되어 있는 프로퍼티

A list of RPC (remote methods) that are pending to be called for this object
protected List rpcStack
리턴 List