Class TimerDisplay

All Implemented Interfaces:
Disposable, Renderable, java.lang.Comparable<Renderable>

public class TimerDisplay
extends UIComponent
A ui component for displaying player time. This is a similar class of ScoreDisplay
  • Constructor Details

  • Method Details

    • create

      public void create()
      Creates reusable ui styles and adds actors to the stage. And starts the timer.
      Overrides:
      create in class UIComponent
    • draw

      public void draw​(SpriteBatch batch)
      Description copied from class: RenderComponent
      Draw the renderable. Should be called only by the renderer, not manually.
      Specified by:
      draw in class RenderComponent
      Parameters:
      batch - Batch to render to.
    • update

      public void update()
      Description copied from class: Component
      Called once per frame of the game, and should be used for most component logic. Not called if component is disabled.
      Overrides:
      update in class Component
    • updatePlayerTimerUI

      public void updatePlayerTimerUI​(int minute, int second)
      Updates the player's gaming time on the ui.
    • dispose

      public void dispose()
      Description copied from class: Component
      Called when the component is disposed. Dispose of any internal resources here.
      Specified by:
      dispose in interface Disposable
      Overrides:
      dispose in class RenderComponent