Class StatisticsSystem

All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, com.esotericsoftware.kryo.KryoSerializable

public final class StatisticsSystem extends GameSystem
  • Field Details

  • Constructor Details

    • StatisticsSystem

      public StatisticsSystem()
  • Method Details

    • write

      public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
      Specified by:
      write in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      write in class Registrable
    • read

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable
      Overrides:
      read in class Registrable
    • affectsGameState

      public boolean affectsGameState()
      Specified by:
      affectsGameState in class GameSystem
    • setup

      public void setup()
      Description copied from class: GameSystem
      Произвести начальную настройку системы. На момент вызова этого метода, systemProvider содержит объекты всех систем.
      Overrides:
      setup in class GameSystem
    • getCurrentReplayChart

      public ReplayManager.ReplayRecord.ChartFrames getCurrentReplayChart()
    • getCurrentReplayChartValues

      public ReplayManager.ReplayRecord.ChartFrames.FrameValues getCurrentReplayChartValues()
    • getBestReplay

      public ReplayManager.ReplayRecord getBestReplay()
      Returns:
      null, если не найдено
    • setStatistic

      public void setStatistic(StatisticsType type, double value)
    • getStatistic

      public double getStatistic(StatisticsType type)
    • addStatistic

      public void addStatistic(StatisticsType type, double delta)
    • getCurrentGameStatistic

      public double getCurrentGameStatistic(StatisticsType type)
      Returns:
      статистику текущего уровня
    • getCurrentGameStatistics

      public double[] getCurrentGameStatistics()
    • flushStatistics

      public void flushStatistics()
      Добавить статистические значения в объект BasicLevel (если это режим BASIC_LEVEL) и в менеджер статистики. После этого стоит сохранить уровни (BasicLevelManager#save()). Стоит вызывать только в конце игры.
    • update

      public void update(float deltaTime)
      Overrides:
      update in class GameSystem
    • getSystemName

      public String getSystemName()
      Specified by:
      getSystemName in class GameSystem
    • dispose

      public void dispose()
      Description copied from interface: com.badlogic.gdx.utils.Disposable
      Releases all resources of this object.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class GameSystem