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
Modifier and TypeClassDescriptionstatic class
static final class
static final class
static final class
static class
static class
static class
static class
static final class
static class
static final class
static final class
static final class
static final class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final float
int
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStatistic
(StatisticsType type, double delta) boolean
void
dispose()
Releases all resources of this object.void
Добавить статистические значения в объект BasicLevel (если это режим BASIC_LEVEL) и в менеджер статистики.float
float
float
double
double[]
double
getStatistic
(StatisticsType type) void
void
setStatistic
(StatisticsType type, double value) Deprecated.use addStatistic - statistics should not be reducedvoid
setup()
Performs the initial configuration of the system.void
update
(float deltaTime) void
Methods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, postSetup, postStateRestore, profileUpdate
Methods 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:
write
in interfaceKryoSerializable
- Overrides:
write
in classRegistrable
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in classRegistrable
-
getAverageCoinsPerMinute
public float getAverageCoinsPerMinute() -
getAverageScorePerMinute
public float getAverageScorePerMinute() -
getAverageKillsPerMinute
public float getAverageKillsPerMinute() -
affectsGameState
public boolean affectsGameState()- Specified by:
affectsGameState
in classGameSystem
-
setup
public void setup()Description copied from class:GameSystem
Performs the initial configuration of the system. At the moment of call, systemProvider already contains all objects of systems.- Overrides:
setup
in 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:
update
in classGameSystem
-
getSystemName
- Specified by:
getSystemName
in classGameSystem
-
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.Disposable
Releases all resources of this object.- Specified by:
dispose
in interfaceDisposable
- Overrides:
dispose
in classGameSystem
-