AnimationContext
interludesoftware.tick¶
Interlude.Tick¶
AnimationContext Class¶
Inheritance System.Object → AnimationContext
Constructors¶
AnimationContext(UI, IClock) Constructor¶
Initializes an animation context bound to ui, using the supplied clock for timing.
Parameters¶
ui UI
The UI instance associated with this animation context.
clock IClock
Clock source for animation timing. Defaults to Interlude.Tick.RealClock.
Fields¶
AnimationContext.LastUsedFrame Field¶
Frame index on which this context was last retrieved via PushAnimate(string) or an animated-color lookup. The owning Interlude.Tick.AnimationContext.UI evicts whole contexts that have gone unused, so that a UI synthesising ids dynamically (per-row list ids, ephemeral panels) doesn't accumulate a permanent context per unique id.
Field Value¶
Methods¶
AnimationContext.Apply() Method¶
Applies the current animation properties to the UI if enabled.
Returns¶
AnimationContext
This animation context for method chaining.
AnimationContext.BoolBecomesFalse(string, bool) Method¶
Gets or creates an animation event that triggers when a boolean value becomes false.
Parameters¶
Unique identifier for this event.
value System.Boolean
The boolean value to track.
Returns¶
AnimationContextEvent
The animation event.
AnimationContext.BoolBecomesTrue(string, bool) Method¶
Gets or creates an animation event that triggers when a boolean value becomes true.
Parameters¶
Unique identifier for this event.
value System.Boolean
The boolean value to track.
Returns¶
AnimationContextEvent
The animation event.
AnimationContext.BoolWhileFalse(string, bool) Method¶
Gets or creates an animation event that triggers while a boolean value is false.
Parameters¶
Unique identifier for this event.
value System.Boolean
The boolean value to track.
Returns¶
AnimationContextEvent
The animation event.
AnimationContext.BoolWhileTrue(string, bool) Method¶
Gets or creates an animation event that triggers while a boolean value is true.
Parameters¶
Unique identifier for this event.
value System.Boolean
The boolean value to track.
Returns¶
AnimationContextEvent
The animation event.
AnimationContext.CleanUp() Method¶
Pops the color, scale, and rotate states pushed by Apply(). No-op when disabled.
AnimationContext.Enabled(bool) Method¶
Enables or disables the animation context.
Parameters¶
enabled System.Boolean
Whether the animation context should be enabled.
Returns¶
AnimationContext
This animation context for method chaining.
AnimationContext.Enter() Method¶
Gets or creates the enter/hover animation event.
Returns¶
AnimationContextEnter
The enter animation event.
AnimationContext.GetColor() Method¶
Gets the primary color property value.
Returns¶
AnimationContext.GetColor(string) Method¶
Gets a color property by ID.
Parameters¶
The property ID.
Returns¶
UnityEngine.Color
The color value.
AnimationContext.GetFloat() Method¶
Gets the primary float property value.
Returns¶
AnimationContext.GetFloat(string) Method¶
Gets a float property by ID.
Parameters¶
The property ID.
Returns¶
System.Single
The float value.
AnimationContext.GetInt() Method¶
Gets the primary int property value.
Returns¶
AnimationContext.GetInt(string) Method¶
Gets an int property by ID.
Parameters¶
Returns¶
AnimationContext.GetRect() Method¶
Gets the primary rect property value.
Returns¶
AnimationContext.GetRect(string) Method¶
Gets a rect property by ID.
Parameters¶
The property ID.
Returns¶
UnityEngine.Rect
The rect value.
AnimationContext.GetRotate() Method¶
Gets the primary rotate property value, in degrees.
Returns¶
AnimationContext.GetScale() Method¶
Gets the primary scale property value.
Returns¶
AnimationContext.Init() Method¶
Gets or creates the initialization animation event.
Returns¶
AnimationContextEventBase
The initialization animation event.
AnimationContext.Leave() Method¶
Gets or creates the leave animation event.
Returns¶
AnimationContextLeave
The leave animation event.
AnimationContext.TryGetColor(string, Color) Method¶
Attempts to retrieve a color property by ID.
Parameters¶
The property ID.
color UnityEngine.Color
The color value if found.
Returns¶
System.Boolean
True if the property exists, false otherwise.
AnimationContext.TryGetFloat(string, float) Method¶
Attempts to retrieve a float property by ID.
Parameters¶
The property ID.
value System.Single
The float value if found.
Returns¶
System.Boolean
True if the property exists, false otherwise.
AnimationContext.TryGetInt(string, int) Method¶
Attempts to retrieve an int property by ID.
Parameters¶
The property ID.
value System.Int32
The int value if found.
Returns¶
System.Boolean
True if the property exists, false otherwise.
AnimationContext.TryGetRect(string, Rect) Method¶
Attempts to retrieve a rect property by ID.
Parameters¶
The property ID.
rect UnityEngine.Rect
The rect value if found.
Returns¶
System.Boolean
True if the property exists, false otherwise.