Exemplo n.º 1
0
        public static void render(Location location, Texture2D texture, int width, int height, bool center)
        {
            SideCraft.spriteBatch.Begin();
            Rectangle position = location.toRectangle(width, height);

            if (center) {
                position = new Rectangle(position.Center.X, position.Bottom, width, height);
            }

            SideCraft.spriteBatch.Draw(texture, position, Color.White);
            SideCraft.spriteBatch.End();
        }
Exemplo n.º 2
0
        public static void render(Location location, Texture2D texture, int width, int height, bool center)
        {
            SideCraft.spriteBatch.Begin();
            Rectangle position = location.toRectangle(width, height);

            if (center)
            {
                position = new Rectangle(position.Center.X, position.Bottom, width, height);
            }

            SideCraft.spriteBatch.Draw(texture, position, Color.White);
            SideCraft.spriteBatch.End();
        }
Exemplo n.º 3
0
 public Rectangle getBounds()
 {
     return(location.toRectangle(32, 32));
 }