Enemy angefangen, HP zu CollidableEntity geaddet
This commit is contained in:
@@ -14,6 +14,16 @@ public abstract class CollidableEntity extends Entity {
|
||||
*/
|
||||
protected int width;
|
||||
protected int height;
|
||||
|
||||
/**
|
||||
* Health Points of the Object
|
||||
*/
|
||||
protected int heakthPoints;
|
||||
|
||||
/**
|
||||
* Shieldpoints of the Object
|
||||
*/
|
||||
protected int shieldPoints;
|
||||
|
||||
|
||||
public int getX() {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package de.teamteamteam.spacescooter.entity;
|
||||
|
||||
public abstract class Enemy extends CollidableEntity {
|
||||
|
||||
protected String name;
|
||||
protected boolean willShoot;
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
if(willShoot)
|
||||
this.shoot();
|
||||
}
|
||||
|
||||
protected abstract void shoot();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user