evil-inside/src/ei/game/scene/units/Tank.java

37 lines
769 B
Java
Raw Normal View History

2007-04-04 14:44:25 +00:00
package ei.game.scene.units;
import ei.engine.math.Vector2f;
2007-04-16 16:13:44 +00:00
import ei.engine.math.Vector2i;
2007-04-16 11:34:57 +00:00
import ei.engine.math.Vector4f;
import ei.engine.scene.Box;
import ei.engine.scene.Entity;
2007-04-04 14:44:25 +00:00
import ei.engine.scene.Sprite;
2007-04-16 11:34:57 +00:00
import ei.engine.texture.Texture;
2007-04-04 14:44:25 +00:00
public class Tank extends Unit{
2007-04-16 11:34:57 +00:00
private Box box;
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-16 16:13:44 +00:00
super(10, 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-04 14:44:25 +00:00
2007-04-16 11:34:57 +00:00
Texture tex = new Texture();
tex.setColor(new Vector4f(0.5f, 1.0f, 0.5f,1));
box = new Box("selectionBox",tex);
box.setSize(new Vector2f(40,40));
}
protected Entity getSelection() {
return box;
2007-04-04 14:44:25 +00:00
}
}