Exemple #1
0
 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);
 }
Exemple #2
0
        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);
        }
Exemple #3
0
 public Animation(List<Condition> conditions, Behavior behavior, Frame frame)
     : this(conditions, behavior, new List<Frame>(new Frame[] { frame }))
 {
 }
Exemple #4
0
 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);
 }
Exemple #5
0
 public void Draw(Frame frame, SpriteBatch spriteBatch, Rectangle destinationRectangle, Color color)
 {
     spriteBatch.DrawEx(this.texture, destinationRectangle, frame.bounds, color);
 }
Exemple #6
0
 public void Draw(Frame frame, SpriteBatch spriteBatch, Rectangle destinationRectangle)
 {
     Draw(frame, spriteBatch, destinationRectangle, Color.White);
 }
Exemple #7
0
 public Animation(Condition condition, Behavior behavior, Frame frame)
     : this(new List<Condition>(new Condition[] { condition }), behavior, new List<Frame>(new Frame[] { frame }))
 {
 }