Interface ITimedSwitchTarget
A ISwitchTarget whose change plays out over time, from the server tick it began at: every peer works out the same pose from the tick, so a door is in the same place on every screen and on the server, and a player who arrives mid-swing sees it mid-swing.
public interface ITimedSwitchTarget : ISwitchTarget
- Inherited Members
Properties
ChangeTick
The server tick the last change began at (0: none since the scene loaded).
uint ChangeTick { get; }
Property Value
ChangeTravel
How far along its travel it stood when that change began, 0..1.
float ChangeTravel { get; }
Property Value
SolidTick
The server tick from which the pose it has come to rest in is solid: 0 while undecided (still moving, or held open to characters because someone stands where it came to rest), 1 for settled since before anyone watched. Only the server decides it, so every peer turns the target solid on the same tick.
uint SolidTick { get; }
Property Value
Methods
SetState(bool, uint, float, uint)
Adopts the server's state: activated, changed at changeTick from
changeTravel, solid at rest from solidTick (0: not yet).
void SetState(bool activated, uint changeTick, float changeTravel, uint solidTick)
Parameters
Events
SolidDecided
Raised on the server when it decides SolidTick, for the switch to tell its observers.
event Action<ITimedSwitchTarget> SolidDecided