Class DistanceDisplay

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

public class DistanceDisplay
extends UIComponent
  • 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
    • updatePlayerDistanceUI

      public void updatePlayerDistanceUI​(double distance)
      Updates the player's distance 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