Exemplo n.º 1
0
        public void Draw(DrawCall.Tag tag, Texture2D texture, Rectangle rectangle, Rectangle sourceRectangle, Color color, float depth)
        {
            DrawCall toAdd = new DrawCall(tag, texture, rectangle, sourceRectangle, 0f, Vector2.Zero, color, depth, SpriteEffects.None);

            if (toAdd.Rectangle.Intersects(Game1.camera.Rectangle))
            {
                drawCalls.Add(depth, toAdd);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="tag"></param>
        /// <param name="texture"></param>
        /// <param name="rectangle"></param>
        /// <param name="sourceRectangle"></param>
        /// <param name="rotation"></param>
        /// <param name="origin"></param>
        /// <param name="color"></param>
        /// <param name="depth"></param>
        /// <param name="spriteEffects"></param>
        /// <param name="affectedByLight">0 - always dark, 1 - dynamic, 2 - always bright</param>
        /// <param name="lightBleedThrough">The amount of light able to pass through the object</param>
        public void Draw(DrawCall.Tag tag, Texture2D texture, Rectangle rectangle, Rectangle sourceRectangle, float rotation, Vector2 origin, Color color, float depth, SpriteEffects spriteEffects, short affectedByLight, float lightBleedThrough)
        {
            DrawCall toAdd = new DrawCall(tag, texture, rectangle, sourceRectangle, rotation, origin, color, depth, spriteEffects, affectedByLight, lightBleedThrough);

            if (toAdd.Rectangle.Intersects(Game1.camera.Rectangle))
            {
                drawCalls.Add(depth, toAdd);
            }
        }
Exemplo n.º 3
0
        public void Draw(DrawCall.Tag tag, Texture2D texture, Rectangle rectangle, float rotation, Vector2 origin, Color color, float depth)
        {
            DrawCall toAdd = new DrawCall(tag, texture, rectangle, rotation, origin, color, depth, SpriteEffects.None);

            if (toAdd.Rectangle.Intersects(Game1.camera.Rectangle))
            {
                drawCalls.Add(depth, toAdd);
            }
        }
Exemplo n.º 4
0
        public void Draw(DrawCall.Tag tag, Texture2D texture, Vector2 position, Rectangle sourceRectangle, Vector2 scale, float rotation, Vector2 origin, Color color, float depth, SpriteEffects spriteEffects)
        {
            DrawCall toAdd = new DrawCall(tag, texture, position, sourceRectangle, scale, rotation, origin, color, depth, spriteEffects, 0, 0);

            if (toAdd.Rectangle.Intersects(Game1.camera.Rectangle))
            {
                drawCalls.Add(depth, toAdd);
            }
        }
Exemplo n.º 5
0
 public DrawCall(DrawCall.Tag tag, string text, SpriteFont font, Vector2 position, Vector2 scale, float rotation, Vector2 origin, Color color, float depth, SpriteEffects spriteEffects, short affectedByLight, float lightBleedThrough)
 {
     this.tag               = tag;
     this.text              = text;
     this.font              = font;
     this.position          = position;
     this.scale             = scale;
     this.rotation          = rotation;
     this.origin            = origin;
     this.color             = color;
     this.depth             = depth;
     this.spriteEffects     = spriteEffects;
     this.useVectorPos      = true;
     this.sourceRectangle   = Rectangle.Empty;
     this.rectangle         = Rectangle.Empty;
     this.texture           = null;
     this.affectedByLight   = affectedByLight;
     this.lightBleedThrough = lightBleedThrough;
     useSourceRectangle     = false;
 }
Exemplo n.º 6
0
 public void DrawString(DrawCall.Tag tag, string text, SpriteFont font, Vector2 position, Color color, float depth)
 {
     drawCalls.Add(depth, new DrawCall(tag, text, font, position, 1f, 0f, Vector2.Zero, color, depth, SpriteEffects.None));
 }
Exemplo n.º 7
0
 public void DrawString(DrawCall.Tag tag, string text, SpriteFont font, Vector2 position, float scale, float rotation, Vector2 origin, Color color, float depth)
 {
     drawCalls.Add(depth, new DrawCall(tag, text, font, position, scale, rotation, origin, color, depth, SpriteEffects.None));
 }
Exemplo n.º 8
0
 public void DrawString(DrawCall.Tag tag, string text, SpriteFont font, Vector2 position, Rectangle sourceRectangle, Vector2 scale, float rotation, Vector2 origin, Color color, float depth, SpriteEffects spriteEffects)
 {
     drawCalls.Add(depth, new DrawCall(tag, text, font, position, scale, rotation, origin, color, depth, spriteEffects));
 }