Entity.Animated Class
Definition
Section titled “Definition”An entity that is a an animated surface.
[DataContract]public class Entity.AnimatedInheritance object
Constructors
Section titled “Constructors”Animated(AnimatedScreenObject)
Section titled “Animated(AnimatedScreenObject)”Creates a new instance of this type from an animated screen surface.
public Animated(AnimatedScreenObject surface)Parameters
Section titled “Parameters”surface AnimatedScreenObject
The animation to use.
Properties
Section titled “Properties”Animation
Section titled “Animation”The animation associated with this animated entity.
[DataMember]public AnimatedScreenObject Animation { get; }DefaultCollisionRectangle
Section titled “DefaultCollisionRectangle”Represents the collision rectangle for this animated surface which is the size of the animation frame.
public Rectangle DefaultCollisionRectangle { get; }CustomCollisionRectangle
Section titled “CustomCollisionRectangle”A relative collision rectangle that you can specify. Defaults to the size of the animation surface.
[DataMember]public Rectangle CustomCollisionRectangle { get; set; }Remarks
Section titled “Remarks”This rectangle should be declared without using the animation center. Only apply the center when you’re testing for collision and reading this rectangle.
IsDirty
Section titled “IsDirty”When true, indicates that this animation is dirty and needs to be redrawn.
public bool IsDirty { get; set; }Methods
Section titled “Methods”Update(TimeSpan)
Section titled “Update(TimeSpan)”Updates the Animation.
public void Update(TimeSpan delta)Parameters
Section titled “Parameters”delta TimeSpan
The time that has elapsed since this method was last called.