public void Draw(Frame frame, SpriteBatch spriteBatch, Rectangle destinationRectangle, Color color, float rotation, Vector2 origin, float layerDepth) { spriteBatch.DrawEx(this.texture, destinationRectangle, frame.bounds, color, rotation, origin, SpriteEffects.None, layerDepth); }
private void initialize(Rectangle bounds, Point anchor) { Frame frame = new Frame(); frame.bounds = bounds; frame.anchor = anchor; List<Frame> frames = new List<Frame>(); frames.Add(frame); Animation animation = new Animation(new List<Condition>(), Animation.Behavior.Static, frames); this.animations = new List<Animation>(); this.animations.Add(animation); }
public Animation(List<Condition> conditions, Behavior behavior, Frame frame) : this(conditions, behavior, new List<Frame>(new Frame[] { frame })) { }
public void Draw(Frame frame, SpriteBatch spriteBatch, Point destinationPoint) { spriteBatch.DrawEx(this.texture, new Rectangle(destinationPoint.X, destinationPoint.Y, frame.bounds.Width, frame.bounds.Height), frame.bounds, Color.White); }
public void Draw(Frame frame, SpriteBatch spriteBatch, Rectangle destinationRectangle, Color color) { spriteBatch.DrawEx(this.texture, destinationRectangle, frame.bounds, color); }
public void Draw(Frame frame, SpriteBatch spriteBatch, Rectangle destinationRectangle) { Draw(frame, spriteBatch, destinationRectangle, Color.White); }
public Animation(Condition condition, Behavior behavior, Frame frame) : this(new List<Condition>(new Condition[] { condition }), behavior, new List<Frame>(new Frame[] { frame })) { }