A class in Root.Township, Alta.Networking.
A NetworkAxisValue that syncs a transform's local position along one axis, between a minimum and maximum.
Constructors
| Member | What it is |
|---|
NetworkAxisPosition() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private float maximumValue | Backing field for MaximumValue (default 1). |
private float minimumValue | Backing field for MinimumValue. |
Properties
| Member | What it is |
|---|
protected override float CurrentValue { get; } | The local position projected on the axis. |
protected override float MaximumValue { get; } | Upper limit of the synced range. |
protected override float MinimumValue { get; } | Lower limit of the synced range. |
Methods
| Member | What it is |
|---|
protected override void ApplyValue(float value) | Sets the local position to the axis times the value. |
protected override float GetDifference(float currentValue, float value) | Absolute difference between two values. |
protected override float LerpToValue(float value, float lerpValue) | Lerps from the current value toward the target. |
1 private and internal method
| Member | What it is |
|---|
private void OnDrawGizmosSelected() | Editor: draws the range of movement as a line. |