C# Class BeardedManStudios.Network.NetworkedMonoBehavior.AuthoritativeFrameHistory

The Authoritative frame history This will do all the magic for handling frame history
Datei anzeigen Open project: drakelinglabs/unityarmada

Public Methods

Method Description
Setup ( bool trackPos, bool trackRotation, bool trackScale ) : void

Sets up the authoritative history for what we want to track

UpdateFrame ( BeardedManStudios.Network.NetWorker owningNetworker, AuthoritativeFrameType type, Vector3 currentValue, byte serverFrame, Vector3 serverValue, Vector3 &previousValue ) : Vector3

Gets the updated frame of a given type, number, target value, and current value

Private Methods

Method Description
FinishFrame ( BeardedManStudios.Network.NetWorker owningNetworker, AuthoritativeFrameType type, Vector3 currentValue, byte serverFrame, Vector3 serverValue ) : Vector3
HandleClient ( AuthoritativeFrameType type, Vector3 currentValue, Vector3 &previousValue ) : void

Method Details

Setup() public method

Sets up the authoritative history for what we want to track
public Setup ( bool trackPos, bool trackRotation, bool trackScale ) : void
trackPos bool Do we want to track the position?
trackRotation bool Do we want to track the rotation?
trackScale bool Do we want to track the scale?
return void

UpdateFrame() public method

Gets the updated frame of a given type, number, target value, and current value
public UpdateFrame ( BeardedManStudios.Network.NetWorker owningNetworker, AuthoritativeFrameType type, Vector3 currentValue, byte serverFrame, Vector3 serverValue, Vector3 &previousValue ) : Vector3
owningNetworker BeardedManStudios.Network.NetWorker
type AuthoritativeFrameType Type of frame we want to update
currentValue Vector3 The current value of the client
serverFrame byte
serverValue Vector3
previousValue Vector3
return Vector3