Struct ObservedResourcePushScheduler.Schedule
The intervals and the periodic-change forecast one Evaluate(uint, in CharacterAttributeResourceState, uint) runs against.
public readonly struct ObservedResourcePushScheduler.Schedule
- Inherited Members
Remarks
A value type with no behaviour beyond ResolveConfirmTick(uint, in Schedule), so the whole schedule can be stated in a test without a character, a TimeManager or a regen pulse.
Constructors
Schedule(uint, uint, uint, bool)
Builds a schedule. secondaryInterval is floored at primaryInterval.
public Schedule(uint primaryInterval, uint secondaryInterval, uint nextPeriodicChangeTick, bool hasPeriodicChange)
Parameters
Fields
HasPeriodicChange
False when the caller has no periodic change to forecast.
public readonly bool HasPeriodicChange
Field Value
NextPeriodicChangeTick
Tick the caller's next PERIODIC change is due on, in the same domain as tick.
public readonly uint NextPeriodicChangeTick
Field Value
PrimaryInterval
Minimum ticks between pushes driven by a Primary change.
public readonly uint PrimaryInterval
Field Value
SecondaryInterval
Minimum ticks between pushes driven by a Secondary change alone.
public readonly uint SecondaryInterval
Field Value
Remarks
A bucket gate alone is nearly enough, but a value hovering on a boundary — stamina held at a bucket edge while drain and regeneration alternate — would otherwise dirty the gate every tick and push at the primary rate. This is the ceiling on that.
Methods
Simple(uint)
One interval for everything and no periodic forecast — the shape tests use.
public static ObservedResourcePushScheduler.Schedule Simple(uint interval)
Parameters
intervaluint