Skip to content

Entity.Animated Class

An entity that is a an animated surface.

C#
[DataContract]
public class Entity.Animated

Inheritance object

Creates a new instance of this type from an animated screen surface.

C#
public Animated(AnimatedScreenObject surface)

surface AnimatedScreenObject
The animation to use.

The animation associated with this animated entity.

C#
[DataMember]
public AnimatedScreenObject Animation { get; }

Represents the collision rectangle for this animated surface which is the size of the animation frame.

C#
public Rectangle DefaultCollisionRectangle { get; }

A relative collision rectangle that you can specify. Defaults to the size of the animation surface.

C#
[DataMember]
public Rectangle CustomCollisionRectangle { get; set; }

This rectangle should be declared without using the animation center. Only apply the center when you’re testing for collision and reading this rectangle.

When true, indicates that this animation is dirty and needs to be redrawn.

C#
public bool IsDirty { get; set; }

Updates the Animation.

C#
public void Update(TimeSpan delta)

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