Exemple #1
0
 public override void Draw()
 {
     if (Visible)
     {
         backgroundImage.Draw(transform.GetPosition(), width, height, color, transform.GetRotation(),
                              transform.GetPivot(), transform.GetScale(), SpriteEffects.None, layerDepth);
     }
 }
    public virtual void Draw()
    {
        if (sprite)
        {
            sprite.Draw();
        }

                #if UNITY_EDITOR
        DrawHitboxes();
                #endif
    }
Exemple #3
0
 public override void Draw()
 {
     if (Visible)
     {
         // If it is monocolored
         if (backgroundImage == null)
         {
             primitiveDrawing.Begin(PrimitiveType.TriangleList);
             primitiveDrawing.AddVertices(vertices, color);
             primitiveDrawing.End();
         }
         // If it has an image
         else
         {
             backgroundImage.Draw(transform.GetPosition(), width, height, color, transform.GetRotation(),
                                  transform.GetPivot(), transform.GetScale(), SpriteEffects.None, layerDepth);
         }
     }
 }
Exemple #4
0
 public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
 {
     SpriteComponent.Draw(gameTime, spriteBatch);
 }