Modifier and Type | Field | Description |
---|---|---|
protected java.util.ArrayList<BulletState> |
bullets |
|
int |
diam |
|
boolean |
gameOver |
|
protected boolean |
keyD |
|
protected boolean |
keyDOWN |
|
protected boolean |
keyE |
|
protected boolean |
keyF |
|
protected boolean |
keyLEFT |
|
protected boolean |
keyQ |
|
protected boolean |
keyRIGHT |
|
protected boolean |
keyS |
|
protected boolean |
keySpace |
|
protected boolean |
keyUP |
|
int |
locX |
|
int |
locY |
|
protected boolean |
mousePress |
|
protected int |
mouseX |
|
protected int |
mouseY |
|
protected MyListener |
myListener |
|
int |
rotate |
|
Setting |
setting |
|
protected WallState |
walls |
Constructor | Description |
---|---|
TankState(WallState walls) |
create a tank
set the move of the tank
|
Modifier and Type | Method | Description |
---|---|---|
java.util.ArrayList<BulletState> |
getBullets() |
|
MyListener |
getMyListener() |
|
int |
getTankLife() |
|
WallState |
getWalls() |
|
boolean |
hasLaser() |
|
boolean |
hasShield() |
|
boolean |
isHasMoreLife() |
|
void |
setHasLaser(boolean hasLaser) |
|
void |
setHasMoreLife(boolean hasMoreLife) |
|
void |
setHasShield(boolean hasShield) |
|
void |
setTankLife(int tankLife) |
|
void |
update() |
The method which updates the game state.
|
protected MyListener myListener
protected boolean keyUP
protected boolean keyDOWN
protected boolean keyRIGHT
protected boolean keyLEFT
protected boolean keySpace
protected boolean keyS
protected boolean keyD
protected boolean keyF
protected boolean keyE
protected boolean keyQ
protected boolean mousePress
protected int mouseX
protected int mouseY
public Setting setting
public int locX
public int locY
public int diam
public int rotate
public boolean gameOver
protected WallState walls
protected java.util.ArrayList<BulletState> bullets
public TankState(WallState walls)
walls
- are the walls in the gamepublic WallState getWalls()
public java.util.ArrayList<BulletState> getBullets()
public MyListener getMyListener()
public void update()
public boolean hasShield()
public void setHasShield(boolean hasShield)
public boolean hasLaser()
public void setHasLaser(boolean hasLaser)
public int getTankLife()
public void setTankLife(int tankLife)
public boolean isHasMoreLife()
public void setHasMoreLife(boolean hasMoreLife)