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.GameRepresents the Game itself and holds all the screens.
-
-
Field Summary
Fields Modifier and Type Field Description protected com.badlogic.gdx.graphics.g2d.SpriteBatchbatchThe Spritebatch used to group all renders.protected floatplayerTotalTimeThe players total time.protected introundThe current round.protected java.lang.Float[]totalTimesA 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 voidcreate()com.badlogic.gdx.graphics.g2d.SpriteBatchgetBatch()floatgetPlayerTotalTime()intgetRound()java.lang.Float[]getTotalTimes()voidrender()voidresize(int width, int height)voidrestore()voidsave()voidsetPlayerTotalTime(float t)voidsetRound(int i)voidsetTimeAt(int i, float t)voidupRound()
-
-
-
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:
renderin interfacecom.badlogic.gdx.ApplicationListener- Overrides:
renderin classcom.badlogic.gdx.Game
-
resize
public void resize(int width, int height)- Specified by:
resizein interfacecom.badlogic.gdx.ApplicationListener- Overrides:
resizein 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()
-
-