package avs.models;

import avs.utils.Textures;

import java.awt.image.*;
import java.awt.*;

import javax.swing.*;

public abstract class Entity{

	private double x;
	private double y;
	private boolean isAlive;
	private Textures texx;
    protected int cost;
    protected int width;
    protected int height;

    public Entity(Textures texx) {
        this.texx = texx;
        this.isAlive = true;
    }

	public Entity(double x, double y, Textures texx){
		this.x = x;
		this.y = y;
		this.texx = texx;
		this.isAlive = true;
	}

	public abstract void tick();
	public abstract void render(Graphics g);

	public boolean isAlive(){
		return this.isAlive;
	}

	public void setIsAlive(boolean isAlive){
		this.isAlive = isAlive;
	}

	public double getX(){
		return this.x;
	}

	public double getY(){
		return this.y;
	}

	public void setX(double x){
		this.x = x;
	}

	public void setY(double y){
		this.y = y;
	}

    public int getCost() {
        return this.cost;
    }

    public int getWidth() {
        return this.width;
    }

    public int getHeight() {
        return this.height;
    }
}

@@ -196,35 +196,8 @@
 y;%0D%0A
-%09private boolean isAlive;%0D%0A
 %09pri
@@ -235,20 +235,21 @@
 ted int 
-cost
+width
 ;%0D%0A    p
@@ -253,37 +253,38 @@
   protected int 
-width
+height
 ;%0D%0A    protected
@@ -284,26 +284,29 @@
 otected 
-int height
+Animator anim
 ;%0D%0A%0D%0A   
@@ -320,16 +320,30 @@
  Entity(
+int w, int h, 
 Textures
@@ -348,24 +348,75 @@
 es texx) %7B%0D%0A
+        this.width = w;%0D%0A        this.height = h;%0D%0A
         this
@@ -503,16 +503,30 @@
 ouble y,
+ int w, int h,
  Texture
@@ -565,16 +565,67 @@
 y = y;%0D%0A
+        this.width = w;%0D%0A        this.height = h;%0D%0A
 %09%09this.t
@@ -747,142 +747,8 @@
 %0D%0A%0D%0A
-%09public boolean isAlive()%7B%0D%0A%09%09return this.isAlive;%0D%0A%09%7D%0D%0A%0D%0A%09public void setIsAlive(boolean isAlive)%7B%0D%0A%09%09this.isAlive = isAlive;%0D%0A%09%7D%0D%0A%0D%0A
 %09pub

Create new constructors.