Class HUD


  • public class HUD
    extends java.lang.Object
    HUD window
    Author:
    Michele Imbriani
    • Field Summary

      Fields 
      Modifier and Type Field Description
      com.badlogic.gdx.scenes.scene2d.Stage stage  
    • Constructor Summary

      Constructors 
      Constructor Description
      HUD​(com.badlogic.gdx.graphics.g2d.SpriteBatch sb, Kroy game)  
    • Method Summary

      Modifier and Type Method Description
      java.lang.Integer getFinalScore()  
      java.lang.Integer getScore()  
      void setScore​(java.lang.Integer x)  
      void update​(float dt)
      Using delta time allows to operate with the real-world time (seconds) rather than the in-game time (which is computed using frames)
      void updateScore​(java.lang.Integer x)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • stage

        public com.badlogic.gdx.scenes.scene2d.Stage stage
    • Constructor Detail

      • HUD

        public HUD​(com.badlogic.gdx.graphics.g2d.SpriteBatch sb,
                   Kroy game)
        Parameters:
        sb - SpriteBatch
        game - Kroy instance
    • Method Detail

      • update

        public void update​(float dt)
        Using delta time allows to operate with the real-world time (seconds) rather than the in-game time (which is computed using frames)
        Parameters:
        dt - Delta Time
      • getFinalScore

        public java.lang.Integer getFinalScore()
      • setScore

        public void setScore​(java.lang.Integer x)
      • getScore

        public java.lang.Integer getScore()
      • updateScore

        public void updateScore​(java.lang.Integer x)
        Parameters:
        x - Points to be added to the score