C# Class BeardedManStudios.Network.NetworkedMonoBehavior

Inheritance: SimpleNetworkedMonoBehavior
Show file Open project: drakelinglabs/unityarmada Class Usage Examples

Public Properties

Property Type Description
authoritativeSyncDistance float
authoritativeSyncRotation float
authoritativeTeleportSyncDistance float

Protected Properties

Property Type Description
colliderRef UnityEngine.Collider
rigidbodyRef UnityEngine.Rigidbody

Public Methods

Method Description
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

Protected Methods

Method Description
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

Private Methods

Method Description
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

Method Details

AddNetworkVariable() protected method

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
return void

AutoritativeSerialize() public method

public AutoritativeSerialize ( ) : void
return void

Deserialize() public method

Only Deserialize the stream of data that is not the owner
public Deserialize ( NetworkingStream stream ) : void
stream NetworkingStream Stream of data to use
return void

DeserializeManualProperties() public method

public DeserializeManualProperties ( NetworkingStream stream ) : void
stream NetworkingStream
return void

Disconnect() public method

public Disconnect ( ) : void
return void

InputCheck() protected method

protected InputCheck ( KeyCode keyCode ) : void
keyCode KeyCode
return void

Locate() public static method

Locate a NetworkedMonoBehavior with a given ID
public static Locate ( ulong id ) : NetworkedMonoBehavior
id ulong ID of the NetworkedMonoBehavior
return NetworkedMonoBehavior

MouseCheck() protected method

protected MouseCheck ( int index ) : void
index int
return void

NetworkDisconnect() protected method

protected NetworkDisconnect ( ) : void
return void

NetworkInitialized() protected method

Called when the data has been initialized across the network for this object (purpose is to override)
protected NetworkInitialized ( ) : void
return void

NetworkStart() protected method

protected NetworkStart ( ) : void
return void

PrepareDeserialize() public method

Prepare this to be Deserialized if it is not the owner
public PrepareDeserialize ( NetworkingStream stream ) : void
stream NetworkingStream Stream of data to use
return void

ProximityInCheck() public method

public ProximityInCheck ( NetworkedMonoBehavior other ) : void
other NetworkedMonoBehavior
return void

ProximityOutCheck() public method

public ProximityOutCheck ( NetworkedMonoBehavior other ) : void
other NetworkedMonoBehavior
return void

Reflect() protected method

protected Reflect ( ) : void
return void

SerializeManualProperties() public method

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
return void

Serialized() public method

Get the serialzed version of this NetworkedMonoBehavior
public Serialized ( ) : BMSByte
return BMSByte

Setup() public method

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
return void

UnityUpdate() protected method

protected UnityUpdate ( ) : void
return void

Property Details

authoritativeSyncDistance public property

This is the maximum distance offset that the player can be from the server before it is syncronized
public float authoritativeSyncDistance
return float

authoritativeSyncRotation public property

This is the maximum rotation in degrees that the player can be from the server before it is syncronized
public float authoritativeSyncRotation
return float

authoritativeTeleportSyncDistance public property

This is the maximum distance offset that the player can be from the server before it is syncronized
public float authoritativeTeleportSyncDistance
return float

colliderRef protected property

Unity5 Reference to the collider
protected Collider,UnityEngine colliderRef
return UnityEngine.Collider

rigidbodyRef protected property

Unity5 Reference to the rigidbody
protected Rigidbody,UnityEngine rigidbodyRef
return UnityEngine.Rigidbody