29 lines
604 B
Java
29 lines
604 B
Java
package ei.game.scene.units;
|
|
|
|
import ei.engine.math.Vector2f;
|
|
import ei.engine.math.Vector2i;
|
|
import ei.engine.scene.Sprite;
|
|
import ei.game.scene.SelectBox;
|
|
|
|
public class Tank extends Unit{
|
|
private SelectBox selectionBox;
|
|
public Tank() {
|
|
this(0, 0);
|
|
}
|
|
|
|
public Tank(int x, int y){
|
|
super(100, new Vector2i(x,y));
|
|
Sprite sp = new Sprite("Tank", "data/units/tank.png");
|
|
sp.setSize(new Vector2f(50,37));
|
|
getNode().add(sp);
|
|
|
|
selectionBox = new SelectBox(40,40,getMaxLife());
|
|
setLife(50);
|
|
}
|
|
|
|
protected SelectBox getSelection() {
|
|
return selectionBox;
|
|
}
|
|
|
|
|
|
}
|