Browse Source

Added 'alive' field to Entity2D

frans 8 years ago
parent
commit
7569fa286f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/main/java/eu/tankernn/gameEngine/entities/Entity2D.java

+ 5 - 0
src/main/java/eu/tankernn/gameEngine/entities/Entity2D.java

@@ -7,6 +7,7 @@ import eu.tankernn.gameEngine.renderEngine.gui.GuiTexture;
 
 public class Entity2D extends GuiTexture {
 	protected Vector2f velocity = new Vector2f(0, 0);
+	protected boolean alive = true;
 	
 	public Entity2D(Texture texture, Vector2f position, Vector2f scale) {
 		super(texture, position, scale);
@@ -36,4 +37,8 @@ public class Entity2D extends GuiTexture {
 	public Vector2f getSize() {
 		return super.getScale();
 	}
+	
+	public boolean isAlive() {
+		return alive;
+	}
 }