Esempio n. 1
0
        public override void Draw(GameTime gameTime)
        {
            if (Visible)
            {
                if (Texture != null)
                {
                    SpriteBatch.DrawArea(Texture, new Vector2(DestX, DestY), SourceRect, new Vector2(Width, Height), Color, Rotation, Origin, SpriteEffect, LayerDepth);
                }
#if DEBUG
                //
                //Graphics.Instance.SpriteBatch.DrawRectangle(DestRect, Color.Black);
                //Graphics.Instance.SpriteBatch.DrawRectangle(TextureRect, Color.Red);
                //dbg.DrawText(new Vector2(TextureRect.X, TextureRect.Y),string.Format("TextureRect,Type={0}", this.GetType().ToString()),Color.Red);
                //dbg.DrawText(new Vector2(DestRect.X, DestRect.Y), string.Format("DestRect,Type={0},X={1},Y={2},Width={3},Height={4}", this.GetType().ToString(),DestRect.X,DestRect.Y,DestRect.Width,DestRect.Height), Color.Black);
#endif
            }
        }