Table of Contents

Class MotionClock

Namespace
Velvet
Assembly
Velvet.Docs.dll

The time source a mounted tree's motion advances on, chosen per mount through MotionClock: every StyleTransitionConfig play whatever its Type, its DelaySec included, a layoutId move, a filter- transition, the animate- loops, and the delta UseFrame(Action<float>, int) hands its callback. Documentation~/motion.md owns the full scope.

public abstract class MotionClock
Inheritance
object
MotionClock

Remarks

Derive from this class for a clock the application controls itself — one a frame-step capture advances by a fixed amount, for instance. On any clock but Realtime, motion steps by the distance NowSec moved since its previous frame, so a clock that does not move holds it where it is.

Constructors

MotionClock()

Constructs a clock. Derive to supply NowSec.

Properties

GameTime

Reads Time.timeAsDouble, so the tree's motion moves only as far as the game's own scaled time has moved — for UI motion that should keep pace with gameplay.

NowSec

The clock's current reading, in seconds. Only differences between readings are used.

Realtime

The default, and the behaviour a tree mounted without a clock has: a Tween runs on UI Toolkit's own transitions, the motion Velvet drives itself and UseFrame(Action<float>, int) advance with the panel scheduler's own time, and an animate- loop and a filter- transition with Time.realtimeSinceStartupAsDouble, which is what NowSec reads.