Package com.prineside.tdi2.managers
Class SettingsManager
java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.SettingsManager
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Manager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static enum
static enum
static enum
static class
static interface
Nested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
dispose()
Releases all resources of this object.static com.badlogic.gdx.Graphics.DisplayMode
getBestFullscreenMode
(int initCfgW, int initCfgH) static com.badlogic.gdx.Graphics.DisplayMode
getBestFullscreenMode
(int initCfgW, int initCfgH, int bestW, int bestH) double
int[]
int
int
com.badlogic.gdx.utils.IntArray
int[]
com.badlogic.gdx.utils.Array<SettingsManager.HotkeyAction>
getHotKeyActions
(com.badlogic.gdx.utils.IntArray keysPressed) com.badlogic.gdx.utils.Array<SettingsManager.HotkeyAction>
int
int
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
postRender
(float deltaTime) Вызывается после отрисовки и обновления экранаvoid
preRender
(float delta) Вызывается перед любыми обновлениями и отрисовками экранов и системvoid
void
save()
void
void
setBugReportsEnabled
(boolean enabled) void
setCustomValue
(SettingsManager.CustomValueType type, double value) void
setDebugDetailedMode
(boolean enabled) void
setDebugMode
(boolean enabled) void
setExplosionsDrawing
(boolean drawing) void
setFlyingCoinsEnabled
(boolean enabled) void
setHotKey
(SettingsManager.HotkeyAction action, int[] keys) void
setInstantAutoWaveCallEnabled
(boolean enabled) void
setLargeFontsEnabled
(boolean enabled) void
setMusicVolume
(double val) void
setParticlesDrawing
(boolean drawing) void
setProjectilesDrawing
(boolean drawing) void
setProjectileTrailsDrawing
(boolean drawing) void
setSoundVoulme
(double val) void
setStainsEnabled
(boolean enabled) boolean
setThreeDeeModelsEnabled
(boolean enabled) void
setUiAnimationsEnabled
(boolean enabled) void
setup()
Вызывается, когда объекты всех менеджеров созданы и можно к ним обращатьсяMethods inherited from class com.prineside.tdi2.Manager.ManagerAdapter
clearPools, test
-
Field Details
-
DEFAULT_HOT_KEYS
public static final int[][] DEFAULT_HOT_KEYS
-
-
Constructor Details
-
SettingsManager
public SettingsManager()
-
-
Method Details
-
isEscButtonJustPressed
public boolean isEscButtonJustPressed()- Returns:
- true, если нажали esc/back и кнопку не перехватил диалог / другой UI
-
isSecretCodesEnabled
public boolean isSecretCodesEnabled() -
getDynamicSetting
-
getScaledViewportHeight
public int getScaledViewportHeight() -
getHotKey
- Returns:
- array of keys to be pressed or null if not set
-
getDefaultHotKey
-
setHotKey
-
isDefaultHotKey
-
getHotKeyActions
public com.badlogic.gdx.utils.Array<SettingsManager.HotkeyAction> getHotKeyActions(com.badlogic.gdx.utils.IntArray keysPressed) -
getHotkeysJustPressed
-
isHotkeyJustPressed
-
getHotKeyName
-
getHotkeyGroupTitle
-
setup
public void setup()Description copied from interface:Manager
Вызывается, когда объекты всех менеджеров созданы и можно к ним обращаться- Specified by:
setup
in interfaceManager
- Overrides:
setup
in classManager.ManagerAdapter
-
getBestFullscreenMode
public static com.badlogic.gdx.Graphics.DisplayMode getBestFullscreenMode(int initCfgW, int initCfgH, int bestW, int bestH) -
getBestFullscreenMode
public static com.badlogic.gdx.Graphics.DisplayMode getBestFullscreenMode(int initCfgW, int initCfgH) -
getCustomValue
-
setCustomValue
-
getGameStartGameVersion
public int getGameStartGameVersion()- Returns:
- версию игры, в которой было записано первое значение в preferences
-
getGameStartTimestamp
public int getGameStartTimestamp()- Returns:
- время начала игры, в которой было записано первое значение в preferences
-
getTimeSpentInGameSinceStart
public int getTimeSpentInGameSinceStart()- Returns:
- время, потраченное на игру в секундах, с момента первого запуска игры / сброса настроек
-
getGameStartHash
- Returns:
- случайную строку, сгенерированную при первом запуске или после сброса настроек
-
addListener
-
removeListener
-
setSoundVoulme
public void setSoundVoulme(double val) -
isSoundEnabled
public boolean isSoundEnabled() -
isMusicEnabled
public boolean isMusicEnabled() -
setMusicVolume
public void setMusicVolume(double val) -
isBugReportsEnabled
public boolean isBugReportsEnabled() -
setBugReportsEnabled
public void setBugReportsEnabled(boolean enabled) -
setExplosionsDrawing
public void setExplosionsDrawing(boolean drawing) -
isExplosionsDrawing
public boolean isExplosionsDrawing() -
setProjectilesDrawing
public void setProjectilesDrawing(boolean drawing) -
isProjectilesDrawing
public boolean isProjectilesDrawing() -
setProjectileTrailsDrawing
public void setProjectileTrailsDrawing(boolean drawing) -
isProjectileTrailsDrawing
public boolean isProjectileTrailsDrawing() -
setParticlesDrawing
public void setParticlesDrawing(boolean drawing) -
isParticlesDrawing
public boolean isParticlesDrawing() -
setUiAnimationsEnabled
public void setUiAnimationsEnabled(boolean enabled) -
isUiAnimationsEnabled
public boolean isUiAnimationsEnabled() -
setFlyingCoinsEnabled
public void setFlyingCoinsEnabled(boolean enabled) -
isFlyingCoinsEnabled
public boolean isFlyingCoinsEnabled() -
setInstantAutoWaveCallEnabled
public void setInstantAutoWaveCallEnabled(boolean enabled) -
isInstantAutoWaveCallEnabled
public boolean isInstantAutoWaveCallEnabled() -
setStainsEnabled
public void setStainsEnabled(boolean enabled) -
isStainsEnabled
public boolean isStainsEnabled() -
setThreeDeeModelsEnabled
public boolean setThreeDeeModelsEnabled(boolean enabled) -
isThreeDeeModelsEnabled
public boolean isThreeDeeModelsEnabled() -
setLargeFontsEnabled
public void setLargeFontsEnabled(boolean enabled) -
isLargeFontsEnabled
public boolean isLargeFontsEnabled() -
setDebugMode
public void setDebugMode(boolean enabled) -
isInDebugMode
public boolean isInDebugMode() -
setDebugDetailedMode
public void setDebugDetailedMode(boolean enabled) -
isInDebugDetailedMode
public boolean isInDebugDetailedMode() -
getHoldingHotKeys
public com.badlogic.gdx.utils.IntArray getHoldingHotKeys() -
preRender
public void preRender(float delta) Description copied from interface:Manager
Вызывается перед любыми обновлениями и отрисовками экранов и систем- Specified by:
preRender
in interfaceManager
- Overrides:
preRender
in classManager.ManagerAdapter
-
postRender
public void postRender(float deltaTime) Description copied from interface:Manager
Вызывается после отрисовки и обновления экрана- Specified by:
postRender
in interfaceManager
- Overrides:
postRender
in classManager.ManagerAdapter
-
saveIfRequired
public void saveIfRequired() -
save
public void save() -
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.Disposable
Releases all resources of this object.- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
- Overrides:
dispose
in classManager.ManagerAdapter
-