Skip to content

Fade Class

Fades out one IScreenSurface while fading in another.

C#
public class Fade : InstructionBase, IComponent

Inheritance objectUpdateComponentInstructionBase

Implements IComponent

Fade(IScreenSurface, IScreenSurface, TimeSpan, EasingBase?)

Section titled “Fade(IScreenSurface, IScreenSurface, TimeSpan, EasingBase?)”
C#
public Fade(IScreenSurface from, IScreenSurface to, TimeSpan duration, EasingBase? easingFunction = null)

from IScreenSurface

to IScreenSurface

duration TimeSpan

easingFunction EasingBase

When true, removes the “From” object from the parent when the transition finishes. Supersedes HideFromObject.

C#
public bool DeparentFromObject { get; set; }

When true, sets IsVisible to false on the “From” object when the transition finishes.

C#
public bool HideFromObject { get; set; }

When true, sets the position of the “To” object to match the “From” object when the transition finishes.

C#
public bool RepositionToObject { get; set; }

Processes the fade between two objects.

C#
public override void Update(IScreenObject componentHost, TimeSpan delta)

componentHost IScreenObject
The host running the component.

delta TimeSpan
The time difference for the frame.