/**
 * Texture.java
 * Stores data for game textures
 *
 * @author  Paul Krishnamurthy
 */

package com.example.flappybird;

import java.awt.image.BufferedImage;
import java.awt.Rectangle;

public class Texture extends HasPosition {

	// Image attributes
	private final BufferedImage image;
	private final Rectangle rect;

	public Texture (BufferedImage image, int x, int y) {
		super(x, y);

		this.image = image;
		int width = image.getWidth();
		int height = image.getHeight();

		this.rect = new Rectangle(x, y, width, height);
	}

	////////////////////////////////////////////////
	// Public getter methods for image attributes //
	////////////////////////////////////////////////

	public BufferedImage getImage () {
		return image;
	}

	public Rectangle getRect () {
		return rect;
	}
}

