Package com.dragonboatrace
Class DragonBoatRace
- java.lang.Object
-
- com.badlogic.gdx.Game
-
- com.dragonboatrace.DragonBoatRace
-
- All Implemented Interfaces:
com.badlogic.gdx.ApplicationListener
public class DragonBoatRace extends com.badlogic.gdx.Game
Represents the Game itself and holds all the screens.
-
-
Field Summary
Fields Modifier and Type Field Description protected com.badlogic.gdx.graphics.g2d.SpriteBatch
batch
The Spritebatch used to group all renders.protected float
playerTotalTime
The players total time.protected int
round
The current round.protected java.lang.Float[]
totalTimes
A list of cumulative times for all boats.
-
Constructor Summary
Constructors Constructor Description DragonBoatRace()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create()
com.badlogic.gdx.graphics.g2d.SpriteBatch
getBatch()
float
getPlayerTotalTime()
int
getRound()
java.lang.Float[]
getTotalTimes()
void
render()
void
resize(int width, int height)
void
restore()
void
save()
void
setPlayerTotalTime(float t)
void
setRound(int i)
void
setTimeAt(int i, float t)
void
upRound()
-
-
-
Field Detail
-
batch
protected com.badlogic.gdx.graphics.g2d.SpriteBatch batch
The Spritebatch used to group all renders.
-
round
protected int round
The current round.
-
totalTimes
protected java.lang.Float[] totalTimes
A list of cumulative times for all boats.
-
playerTotalTime
protected float playerTotalTime
The players total time.
-
-
Method Detail
-
create
public void create()
-
render
public void render()
- Specified by:
render
in interfacecom.badlogic.gdx.ApplicationListener
- Overrides:
render
in classcom.badlogic.gdx.Game
-
resize
public void resize(int width, int height)
- Specified by:
resize
in interfacecom.badlogic.gdx.ApplicationListener
- Overrides:
resize
in classcom.badlogic.gdx.Game
-
getBatch
public com.badlogic.gdx.graphics.g2d.SpriteBatch getBatch()
-
getRound
public int getRound()
-
setRound
public void setRound(int i)
-
upRound
public void upRound()
-
setTimeAt
public void setTimeAt(int i, float t)
-
getPlayerTotalTime
public float getPlayerTotalTime()
-
setPlayerTotalTime
public void setPlayerTotalTime(float t)
-
getTotalTimes
public java.lang.Float[] getTotalTimes()
-
restore
public void restore()
-
save
public void save()
-
-