2007-04-04 14:44:25 +00:00
|
|
|
package ei.game.scene.units;
|
|
|
|
|
|
2007-04-15 18:52:42 +00:00
|
|
|
import ei.engine.math.Vector2f;
|
2007-04-16 16:13:44 +00:00
|
|
|
import ei.engine.math.Vector2i;
|
2007-04-04 14:44:25 +00:00
|
|
|
import ei.engine.scene.Sprite;
|
2007-04-17 12:51:26 +00:00
|
|
|
import ei.game.scene.SelectBox;
|
2007-04-04 14:44:25 +00:00
|
|
|
|
|
|
|
|
public class Tank extends Unit{
|
2007-04-17 12:51:26 +00:00
|
|
|
private SelectBox selectionBox;
|
2007-04-04 16:28:57 +00:00
|
|
|
public Tank() {
|
2007-04-04 18:15:11 +00:00
|
|
|
this(0, 0);
|
2007-04-04 16:28:57 +00:00
|
|
|
}
|
2007-04-04 14:44:25 +00:00
|
|
|
|
2007-04-04 16:28:57 +00:00
|
|
|
public Tank(int x, int y){
|
2007-04-17 14:21:36 +00:00
|
|
|
super(100, new Vector2i(x,y));
|
2007-04-16 11:34:57 +00:00
|
|
|
Sprite sp = new Sprite("Tank", "data/units/tank.png");
|
|
|
|
|
sp.setSize(new Vector2f(50,37));
|
|
|
|
|
getNode().add(sp);
|
2007-04-17 12:51:26 +00:00
|
|
|
|
2007-04-17 14:21:36 +00:00
|
|
|
selectionBox = new SelectBox(40,40,getMaxLife());
|
|
|
|
|
setLife(50);
|
2007-04-16 11:34:57 +00:00
|
|
|
}
|
|
|
|
|
|
2007-04-17 12:51:26 +00:00
|
|
|
protected SelectBox getSelection() {
|
|
|
|
|
return selectionBox;
|
2007-04-04 14:44:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|