package cz.vutbr.feec.transportObjects;

import javafx.scene.image.Image;
import cz.vutbr.feec.gui.AccidentInCanvas;
import cz.vutbr.feec.gui.OtherObjectInCanvas;

public class AccidentCrate {
	public AccidentInCanvas object;
	public int posX;
	public int posY;
	public int sizeX;
	public int sizeY;
	public int delimiterSize;
	public Image image;

	public AccidentCrate(AccidentInCanvas object) {
		this.object = object;
		posX = object.getPositionX();
		posY = object.getPositionY();
		sizeX = object.getSizeX();
		sizeY = object.getSizeY();
		image = object.getImage();

	}

	public boolean isThisObject(int x, int y) {
		int size = object.getAccidentCanvas().getImageSize();
		if ((x > posX && x < posX + (sizeX * size))
				&& (y > posY && y < posY + (sizeY * size))) {
			return true;
		}
		return false;
	}

}
