Class AnimatedBoxGrow
Animates drawing a box. It can either
Implements
Inherited Members
Namespace: SadConsole.Instructions
Assembly: SadConsole.Extended.dll
Syntax
public class AnimatedBoxGrow : InstructionBase, IComponent
Constructors
AnimatedBoxGrow(Rectangle, TimeSpan, ShapeParameters)
Creates a new animated box defined by the area
. The box is animated over time and drawn with the set of shape parameters provided.
Declaration
public AnimatedBoxGrow(Rectangle area, TimeSpan duration, ShapeParameters shapeParameters)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | area | The final area the box is shown on the screen. |
TimeSpan | duration | How long it takes to animate. |
ShapeParameters | shapeParameters | The shape parameters that define how the box looks. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException |
Methods
OnAdded(IScreenObject)
Called when the component is added to a host.
Declaration
public override void OnAdded(IScreenObject host)
Parameters
Type | Name | Description |
---|---|---|
IScreenObject | host | The host that added the component. |
Overrides
Update(IScreenObject, TimeSpan)
Executes the instruction. This base class method should be called from derived classes. If the IsFinished property is set to true, will try to repeat if needed and will raise all appropriate events.
Declaration
public override void Update(IScreenObject componentHost, TimeSpan delta)
Parameters
Type | Name | Description |
---|---|---|
IScreenObject | componentHost | The object that hosts this instruction. |
TimeSpan | delta | The time that has elapsed since this method was last called. |