Skip to content

AnimatedBoxGrow Class

Animates drawing a box. It can either

C#
public class AnimatedBoxGrow : InstructionBase, IComponent

Inheritance objectUpdateComponentInstructionBase

Implements IComponent

AnimatedBoxGrow(Rectangle, TimeSpan, ShapeParameters)

Section titled “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.

C#
public AnimatedBoxGrow(Rectangle area, TimeSpan duration, ShapeParameters shapeParameters)

area SadRogue.Primitives.Rectangle
The final area the box is shown on the screen.

duration TimeSpan
How long it takes to animate.

shapeParameters ShapeParameters
The shape parameters that define how the box looks.

ArgumentOutOfRangeException

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.

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

componentHost IScreenObject
The object that hosts this instruction.

delta TimeSpan
The time that has elapsed since this method was last called.

Called when the component is added to a host.

C#
public override void OnAdded(IScreenObject host)

host IScreenObject
The host that added the component.