C# Класс BeardedManStudios.Network.NetworkedMonoBehavior

Наследование: SimpleNetworkedMonoBehavior
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
authoritativeSyncDistance float
authoritativeSyncRotation float
authoritativeTeleportSyncDistance float

Защищенные свойства (Protected)

Свойство Тип Описание
colliderRef UnityEngine.Collider
rigidbodyRef UnityEngine.Rigidbody

Открытые методы

Метод Описание
AutoritativeSerialize ( ) : void
Deserialize ( NetworkingStream stream ) : void

Only Deserialize the stream of data that is not the owner

DeserializeManualProperties ( NetworkingStream stream ) : void
Disconnect ( ) : void
Locate ( ulong id ) : NetworkedMonoBehavior

Locate a NetworkedMonoBehavior with a given ID

PrepareDeserialize ( NetworkingStream stream ) : void

Prepare this to be Deserialized if it is not the owner

ProximityInCheck ( NetworkedMonoBehavior other ) : void
ProximityOutCheck ( NetworkedMonoBehavior other ) : void
SerializeManualProperties ( bool reliable = false, NetworkReceivers receivers = NetworkReceivers.All ) : void

Used to serialize manual properties across the network for this object

Serialized ( ) : BMSByte

Get the serialzed version of this NetworkedMonoBehavior

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

Setup this NetworkedMonoBehavior with the owner of this object along with the networked ID

Защищенные методы

Метод Описание
AddNetworkVariable ( Func getter, Action setter, NetSync netSync = null, bool manualProperty = false, bool serverOnly = false ) : void

Add a network variable to the NetworkedMonoBehavior to use

InputCheck ( KeyCode keyCode ) : void
MouseCheck ( int index ) : void
NetworkDisconnect ( ) : void
NetworkInitialized ( ) : void

Called when the data has been initialized across the network for this object (purpose is to override)

NetworkStart ( ) : void
Reflect ( ) : void
UnityUpdate ( ) : void

Приватные методы

Метод Описание
AuthoritativeInitialize ( BMSByte data ) : void
DoSerialize ( ) : void
EnteredProximity ( ) : void
ExitedProximity ( ) : void
GetNextSerializedTransform ( SerializeVector3Properties type, NetworkingStream stream, Vector3 standard ) : Vector3
InitializeObject ( ) : void
KeyDownRequest ( int keyCode, int frame ) : void
KeyUpRequest ( int keyCode, int frame ) : void
MouseDownRequest ( int index, int frame ) : void
MouseUpRequest ( int index, int frame ) : void
OwnedUpdate ( ) : void
PrepareNextSerializedTransform ( SerializeVector3Properties type, Vector3 value ) : void
SetupPreviousTransform ( ) : void
TrackFrameHistory ( ) : void
UpdateRemoteNetRef ( NetRef obj ) : void
UpdateValues ( ) : void

Описание методов

AddNetworkVariable() защищенный Метод

Add a network variable to the NetworkedMonoBehavior to use
protected AddNetworkVariable ( Func getter, Action setter, NetSync netSync = null, bool manualProperty = false, bool serverOnly = false ) : void
getter Func Variable to get
setter Action Variable to set
netSync NetSync
manualProperty bool
serverOnly bool
Результат void

AutoritativeSerialize() публичный Метод

public AutoritativeSerialize ( ) : void
Результат void

Deserialize() публичный Метод

Only Deserialize the stream of data that is not the owner
public Deserialize ( NetworkingStream stream ) : void
stream NetworkingStream Stream of data to use
Результат void

DeserializeManualProperties() публичный Метод

public DeserializeManualProperties ( NetworkingStream stream ) : void
stream NetworkingStream
Результат void

Disconnect() публичный Метод

public Disconnect ( ) : void
Результат void

InputCheck() защищенный Метод

protected InputCheck ( KeyCode keyCode ) : void
keyCode KeyCode
Результат void

Locate() публичный статический Метод

Locate a NetworkedMonoBehavior with a given ID
public static Locate ( ulong id ) : NetworkedMonoBehavior
id ulong ID of the NetworkedMonoBehavior
Результат NetworkedMonoBehavior

MouseCheck() защищенный Метод

protected MouseCheck ( int index ) : void
index int
Результат void

NetworkDisconnect() защищенный Метод

protected NetworkDisconnect ( ) : void
Результат void

NetworkInitialized() защищенный Метод

Called when the data has been initialized across the network for this object (purpose is to override)
protected NetworkInitialized ( ) : void
Результат void

NetworkStart() защищенный Метод

protected NetworkStart ( ) : void
Результат void

PrepareDeserialize() публичный Метод

Prepare this to be Deserialized if it is not the owner
public PrepareDeserialize ( NetworkingStream stream ) : void
stream NetworkingStream Stream of data to use
Результат void

ProximityInCheck() публичный Метод

public ProximityInCheck ( NetworkedMonoBehavior other ) : void
other NetworkedMonoBehavior
Результат void

ProximityOutCheck() публичный Метод

public ProximityOutCheck ( NetworkedMonoBehavior other ) : void
other NetworkedMonoBehavior
Результат void

Reflect() защищенный Метод

protected Reflect ( ) : void
Результат void

SerializeManualProperties() публичный Метод

Used to serialize manual properties across the network for this object
public SerializeManualProperties ( bool reliable = false, NetworkReceivers receivers = NetworkReceivers.All ) : void
reliable bool Determines if these properties should be reliably sent
receivers NetworkReceivers The receivers for this data
Результат void

Serialized() публичный Метод

Get the serialzed version of this NetworkedMonoBehavior
public Serialized ( ) : BMSByte
Результат BMSByte

Setup() публичный Метод

Setup this NetworkedMonoBehavior with the owner of this object along with the networked ID
public Setup ( BeardedManStudios.Network.NetWorker owningSocket, bool isOwner, ulong networkId, ulong ownerId, bool isSceneObject = false ) : void
owningSocket BeardedManStudios.Network.NetWorker The socket that owns this object
isOwner bool Is this the owner of this object
networkId ulong Network ID of who owns it
ownerId ulong The network identifyer for the player who owns this object
isSceneObject bool
Результат void

UnityUpdate() защищенный Метод

protected UnityUpdate ( ) : void
Результат void

Описание свойств

authoritativeSyncDistance публичное свойство

This is the maximum distance offset that the player can be from the server before it is syncronized
public float authoritativeSyncDistance
Результат float

authoritativeSyncRotation публичное свойство

This is the maximum rotation in degrees that the player can be from the server before it is syncronized
public float authoritativeSyncRotation
Результат float

authoritativeTeleportSyncDistance публичное свойство

This is the maximum distance offset that the player can be from the server before it is syncronized
public float authoritativeTeleportSyncDistance
Результат float

colliderRef защищенное свойство

Unity5 Reference to the collider
protected Collider,UnityEngine colliderRef
Результат UnityEngine.Collider

rigidbodyRef защищенное свойство

Unity5 Reference to the rigidbody
protected Rigidbody,UnityEngine rigidbodyRef
Результат UnityEngine.Rigidbody