Package com.prineside.tdi2.managers
Class GameValueManager
java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.GameValueManager
- All Implemented Interfaces:
Disposable
,Manager
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static interface
static final class
static class
static class
static class
static enum
Nested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createSnapshot
(GameValueManager.GameValuesSnapshot snapshot, DifficultyMode difficultyMode, boolean fillWithEffects, BasicLevel forLevel, boolean disableResearchAndTrophies, boolean forUserMaps, ProgressManager.ProgressSnapshotForState progressSnapshot) formatEffectTitleValue
(double value, GameValueType type) formatEffectValue
(double value, GameValueManager.ValueUnits units) Use formatEffectTitleValue() to format both title and value (to properly print boolean GVs)Get current effects of GV snapshot, depends on the selected difficulty mode.getDisabledTitle
(GameValueType valueType) Depends on the selected difficultygetTitle
(GameValueType valueType) getUnits
(GameValueType valueType) void
void
void
setup()
Called when all manager objects are already created and can be accessedvoid
test()
Called after all managers are set up.Methods inherited from class com.prineside.tdi2.Manager.ManagerAdapter
dispose, postRender, preRender
-
Field Details
-
ICON_BACKGROUND_COLOR
-
-
Constructor Details
-
GameValueManager
public GameValueManager()
-
-
Method Details
-
setup
public void setup()Description copied from interface:Manager
Called when all manager objects are already created and can be accessed- Specified by:
setup
in interfaceManager
- Overrides:
setup
in classManager.ManagerAdapter
-
addListener
-
removeListener
-
getCheatingReason
-
requireRecalculation
public void requireRecalculation() -
getCurrentEffects
Get current effects of GV snapshot, depends on the selected difficulty mode. Does not affect the actual snapshots, generated on demand (a bit costly, do not call too frequently)- Returns:
- array of currently applied effects
-
formatEffectValue
Use formatEffectTitleValue() to format both title and value (to properly print boolean GVs) -
formatEffectTitleValue
-
getStockValueConfig
-
getTitle
-
getDisabledTitle
-
getUnits
-
getSnapshot
Depends on the selected difficulty -
getEndlessSnapshot
-
createSnapshot
public static GameValueManager.GameValuesSnapshot createSnapshot(@Null GameValueManager.GameValuesSnapshot snapshot, DifficultyMode difficultyMode, boolean fillWithEffects, BasicLevel forLevel, boolean disableResearchAndTrophies, boolean forUserMaps, ProgressManager.ProgressSnapshotForState progressSnapshot) - Parameters:
snapshot
- куда записывать, может быть null (вернет новый)fillWithEffects
- записывать все найденные эффекты в currentEffectsforLevel
- для какого уровня просчитывать (уровни получают бонусы от квестов), может быть nulldisableResearchAndTrophies
- для базы, которая отменяет эффекты исследований (просчитаются стандартные значения или + те, что не игнорируются с forUserMaps)forUserMaps
- если true и disableResearchAndTrophies = true, вернет стандартные значения с теми, которые не игнорируются пользовательскими картами
-
test
public void test()Description copied from interface:Manager
Called after all managers are set up. Tests managers early to make sure they can work as intended.- Specified by:
test
in interfaceManager
- Overrides:
test
in classManager.ManagerAdapter
-