AnimatedFloatLerp
A class in Root.Township, Alta.Networking.Animation.
A synced animator float that clients ease towards the received value instead of jumping to it. Big changes past snapThreshold snap straight away.
- Listed in Networking and servers
- Inherits or implements
AnimatedFloat
Constructors
| Member | What it is |
|---|---|
AnimatedFloatLerp(string name) | Creates an AnimatedFloatLerp from name. |
Fields
4 private and internal fields
Properties
| Member | What it is |
|---|---|
override float Value { get; set; } | The target value. Setting it starts easing, or snaps when the change is tiny or over the snap threshold, and marks it changed for syncing. |
Methods
| Member | What it is |
|---|---|
void Lerp() | Moves the shown value a step towards the target and writes it to the animator. NetworkAnimator calls it each update. |
protected override void Serialize(Stream stream) | Sends the target value. Clients start easing towards it, or snap if the change is over the snap threshold. |
protected override void Update() | Writes the current eased value to the animator parameter. |
Used in
Members of other types that take, return or hold a AnimatedFloatLerp: