Package com.prineside.tdi2.systems
Class StatisticsSystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.StatisticsSystem
- All Implemented Interfaces:
Disposable,KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final classstatic final classstatic final classstatic classstatic classstatic classstatic classstatic final classstatic classstatic final classstatic final classstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final floatintFields inherited from class com.prineside.tdi2.Registrable
S -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStatistic(StatisticsType type, double delta) booleanvoiddispose()Releases all resources of this object.voidДобавить статистические значения в объект BasicLevel (если это режим BASIC_LEVEL) и в менеджер статистики.floatfloatfloatdoubledouble[]doublegetStatistic(StatisticsType type) voidvoidsetStatistic(StatisticsType type, double value) Deprecated.use addStatistic - statistics should not be reducedvoidsetup()Performs the initial configuration of the system.voidupdate(float deltaTime) voidMethods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, postSetup, postStateRestore, profileUpdateMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
AVERAGES_COUNT_INTERVAL
public static final float AVERAGES_COUNT_INTERVAL- See Also:
-
AVERAGES_COUNT_BUFFER_SIZE
public static final int AVERAGES_COUNT_BUFFER_SIZE- See Also:
-
replayChartFrameCounter
public int replayChartFrameCounter
-
-
Constructor Details
-
StatisticsSystem
public StatisticsSystem()
-
-
Method Details
-
write
- Specified by:
writein interfaceKryoSerializable- Overrides:
writein classRegistrable
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classRegistrable
-
getAverageCoinsPerMinute
public float getAverageCoinsPerMinute() -
getAverageScorePerMinute
public float getAverageScorePerMinute() -
getAverageKillsPerMinute
public float getAverageKillsPerMinute() -
affectsGameState
public boolean affectsGameState()- Specified by:
affectsGameStatein classGameSystem
-
setup
public void setup()Description copied from class:GameSystemPerforms the initial configuration of the system. At the moment of call, systemProvider already contains all objects of systems.- Overrides:
setupin classGameSystem
-
getCurrentReplayChart
-
getCurrentReplayChartValues
-
getBestReplay
- Returns:
- null, если не найдено
-
setStatistic
Deprecated.use addStatistic - statistics should not be reduced -
getStatistic
-
addStatistic
-
getCurrentGameStatistic
- Returns:
- статистику текущего уровня
-
getCurrentGameStatistics
public double[] getCurrentGameStatistics() -
flushStatistics
public void flushStatistics()Добавить статистические значения в объект BasicLevel (если это режим BASIC_LEVEL) и в менеджер статистики. После этого стоит сохранить уровни (BasicLevelManager#save()). Стоит вызывать только в конце игры. -
update
public void update(float deltaTime) - Overrides:
updatein classGameSystem
-
getSystemName
- Specified by:
getSystemNamein classGameSystem
-
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.DisposableReleases all resources of this object.- Specified by:
disposein interfaceDisposable- Overrides:
disposein classGameSystem
-