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 enumstatic enumstatic enumstatic enumstatic classstatic interfaceNested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddispose()Releases all resources of this object.static com.badlogic.gdx.Graphics.DisplayModegetBestFullscreenMode(int initCfgW, int initCfgH) static com.badlogic.gdx.Graphics.DisplayModegetBestFullscreenMode(int initCfgW, int initCfgH, int bestW, int bestH) doubleint[]intintcom.badlogic.gdx.utils.IntArrayint[]com.badlogic.gdx.utils.Array<SettingsManager.HotkeyAction>getHotKeyActions(com.badlogic.gdx.utils.IntArray keysPressed) com.badlogic.gdx.utils.Array<SettingsManager.HotkeyAction>intintbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanvoidpostRender(float deltaTime) Вызывается после отрисовки и обновления экранаvoidpreRender(float delta) Вызывается перед любыми обновлениями и отрисовками экранов и системvoidvoidsave()voidvoidsetBugReportsEnabled(boolean enabled) voidsetCustomValue(SettingsManager.CustomValueType type, double value) voidsetDebugDetailedMode(boolean enabled) voidsetDebugMode(boolean enabled) voidsetExplosionsDrawing(boolean drawing) voidsetFlyingCoinsEnabled(boolean enabled) voidsetHotKey(SettingsManager.HotkeyAction action, int[] keys) voidsetInstantAutoWaveCallEnabled(boolean enabled) voidsetLargeFontsEnabled(boolean enabled) voidsetMusicVolume(double val) voidsetParticlesDrawing(boolean drawing) voidsetProjectilesDrawing(boolean drawing) voidsetProjectileTrailsDrawing(boolean drawing) voidsetSoundVoulme(double val) voidsetStainsEnabled(boolean enabled) booleansetThreeDeeModelsEnabled(boolean enabled) voidsetUiAnimationsEnabled(boolean enabled) voidsetup()Вызывается, когда объекты всех менеджеров созданы и можно к ним обращаться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
-
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:
setupin interfaceManager- Overrides:
setupin 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:
preRenderin interfaceManager- Overrides:
preRenderin classManager.ManagerAdapter
-
postRender
public void postRender(float deltaTime) Description copied from interface:ManagerВызывается после отрисовки и обновления экрана- Specified by:
postRenderin interfaceManager- Overrides:
postRenderin classManager.ManagerAdapter
-
saveIfRequired
public void saveIfRequired() -
save
public void save() -
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.DisposableReleases all resources of this object.- Specified by:
disposein interfacecom.badlogic.gdx.utils.Disposable- Overrides:
disposein classManager.ManagerAdapter
-