Class 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.
      • Fields inherited from class com.badlogic.gdx.Game

        screen
    • Constructor Summary

      Constructors 
      Constructor Description
      DragonBoatRace()  
    • 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.
    • Constructor Detail

      • DragonBoatRace

        public DragonBoatRace()
    • Method Detail

      • create

        public void create()
      • render

        public void render()
        Specified by:
        render in interface com.badlogic.gdx.ApplicationListener
        Overrides:
        render in class com.badlogic.gdx.Game
      • resize

        public void resize​(int width,
                           int height)
        Specified by:
        resize in interface com.badlogic.gdx.ApplicationListener
        Overrides:
        resize in class com.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()