Class Fade
Fades out one IScreenSurface while fading in another.
Implements
Inherited Members
Namespace: SadConsole.Transitions
Assembly: SadConsole.Extended.dll
Syntax
public class Fade : InstructionBase, IComponent
Constructors
Fade(IScreenSurface, IScreenSurface, TimeSpan, EasingBase?)
Declaration
public Fade(IScreenSurface from, IScreenSurface to, TimeSpan duration, EasingBase? easingFunction = null)
Parameters
Type | Name | Description |
---|---|---|
IScreenSurface | from | |
IScreenSurface | to | |
TimeSpan | duration | |
EasingBase | easingFunction |
Properties
DeparentFromObject
When true, removes the "From" object from the parent when the transition finishes. Supersedes HideFromObject.
Declaration
public bool DeparentFromObject { get; set; }
Property Value
Type | Description |
---|---|
bool |
HideFromObject
Declaration
public bool HideFromObject { get; set; }
Property Value
Type | Description |
---|---|
bool |
RepositionToObject
When true, sets the position of the "To" object to match the "From" object when the transition finishes.
Declaration
public bool RepositionToObject { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
Update(IScreenObject, TimeSpan)
Processes the fade between two objects.
Declaration
public override void Update(IScreenObject componentHost, TimeSpan delta)
Parameters
Type | Name | Description |
---|---|---|
IScreenObject | componentHost | The host running the component. |
TimeSpan | delta | The time difference for the frame. |