Package com.prineside.tdi2.managers
Class AssetManager
java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.AssetManager
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Manager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
Nested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
com.badlogic.gdx.graphics.g3d.Material
com.badlogic.gdx.graphics.g3d.Material
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRegionCharsToFont
(com.badlogic.gdx.graphics.g2d.BitmapFont font, int fontResolution) Used by ResourcePack onlystatic void
void
dispose()
Releases all resources of this object.com.badlogic.gdx.graphics.Texture
com.badlogic.gdx.graphics.Color
com.badlogic.gdx.graphics.g2d.BitmapFont
com.badlogic.gdx.graphics.g2d.BitmapFont
com.badlogic.gdx.graphics.g2d.BitmapFont
com.badlogic.gdx.graphics.g2d.BitmapFont
getDebugFont
(boolean markupEnabled) com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle
com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
getDrawable
(String regionAlias) Возвращает всегда один и тот же Drawable с указанным алиасом региона.getFont
(int size) getFont
(int size, boolean hasMarkup) float
getFontScaleMultiplier
(int fontSize) Depens only on "lage fonts" settingcom.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle
getLabelStyle
(int fontSize) void
getModel
(String fileName, ObjectConsumer<com.badlogic.gdx.graphics.g3d.Model> onReady) com.badlogic.gdx.scenes.scene2d.utils.Drawable
com.badlogic.gdx.graphics.g2d.ParticleEffectPool
getParticleEffectPool
(String particleName) May return Quad.getNoQuad() if not foundgetQuadOrNull
(String alias) void
getSceneModel
(ObjectConsumer<com.badlogic.gdx.graphics.g3d.Model> onReady) com.badlogic.gdx.graphics.g3d.Model
com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle
getScrollPaneStyle
(float width) com.badlogic.gdx.graphics.g2d.BitmapFont
com.badlogic.gdx.graphics.g2d.BitmapFont
com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle
getSound
(StaticSoundType soundType) Получает трек из последнего набора ресурсов, в котором все они естьcom.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle
getTextFieldStyle
(com.badlogic.gdx.graphics.g2d.BitmapFont font) getTextureRegion
(String regionAlias) getTextureRegion
(String regionAlias, boolean throwExceptionOnMissing) com.badlogic.gdx.utils.Array<ResourcePack.AtlasTextureRegion>
getTextureRegions
(String regionAlias) loadWebTexture
(String src) loadWebTexture
(String src, boolean ignoreCache) static com.badlogic.gdx.files.FileHandle
localOrInternalFile
(String path) void
setup()
Вызывается, когда объекты всех менеджеров созданы и можно к ним обращатьсяvoid
test()
Запустить тестирование, чтобы проверить, все ли ресурсы есть (текстуры / i18n) Запускается после загрузки всех менеджеровMethods inherited from class com.prineside.tdi2.Manager.ManagerAdapter
clearPools, postRender, preRender
-
Field Details
-
BLANK_REGION_NAME
- See Also:
-
TR
-
normalMaterial
public com.badlogic.gdx.graphics.g3d.Material normalMaterial -
blendedMaterial
public com.badlogic.gdx.graphics.g3d.Material blendedMaterial
-
-
Constructor Details
-
AssetManager
public AssetManager()
-
-
Method Details
-
getParticleEffectPool
-
clearCacheDir
public static void clearCacheDir() -
localOrInternalFile
-
loadWebTexture
-
loadWebTexture
-
getModel
-
getSceneModelIfLoaded
public com.badlogic.gdx.graphics.g3d.Model getSceneModelIfLoaded() -
getSceneModel
-
replaceRegionAliasesWithChars
- Returns:
- одинаковый инстанс SB или str, если не заменено ничего - не использовать его напрямую!
-
addRegionCharsToFont
public void addRegionCharsToFont(com.badlogic.gdx.graphics.g2d.BitmapFont font, int fontResolution) Used by ResourcePack only -
setup
public void setup()Description copied from interface:Manager
Вызывается, когда объекты всех менеджеров созданы и можно к ним обращаться- Specified by:
setup
in interfaceManager
- Overrides:
setup
in classManager.ManagerAdapter
-
getFontScaleMultiplier
public float getFontScaleMultiplier(int fontSize) Depens only on "lage fonts" setting -
getColor
-
getQuad
May return Quad.getNoQuad() if not found -
getQuadOrNull
-
getTextureRegion
-
getTextureRegion
public ResourcePack.AtlasTextureRegion getTextureRegion(String regionAlias, boolean throwExceptionOnMissing) -
getTextureRegions
public com.badlogic.gdx.utils.Array<ResourcePack.AtlasTextureRegion> getTextureRegions(String regionAlias) -
getLabelStyle
public com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle getLabelStyle(int fontSize) -
getTextFieldStyle
public com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle getTextFieldStyle(com.badlogic.gdx.graphics.g2d.BitmapFont font) -
getDebugLabelStyle
public com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle getDebugLabelStyle() -
getSmallDebugLabelStyle
public com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle getSmallDebugLabelStyle() -
getScrollPaneStyle
public com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle getScrollPaneStyle(float width) -
getDrawable
Возвращает всегда один и тот же Drawable с указанным алиасом региона. -
getOverlayBackground
public com.badlogic.gdx.scenes.scene2d.utils.Drawable getOverlayBackground() -
getBlankWhiteTextureRegion
-
getDamageNumbersOverTimeFont
public com.badlogic.gdx.graphics.g2d.BitmapFont getDamageNumbersOverTimeFont() -
getDamageNumbersEspeciallyEffectiveFont
public com.badlogic.gdx.graphics.g2d.BitmapFont getDamageNumbersEspeciallyEffectiveFont() -
getDamageNumbersFont
public com.badlogic.gdx.graphics.g2d.BitmapFont getDamageNumbersFont() -
getDebugFont
public com.badlogic.gdx.graphics.g2d.BitmapFont getDebugFont(boolean markupEnabled) -
getSmallDebugFont
public com.badlogic.gdx.graphics.g2d.BitmapFont getSmallDebugFont() -
getSmallDebugFontNoMarkup
public com.badlogic.gdx.graphics.g2d.BitmapFont getSmallDebugFontNoMarkup() -
getBannerTexture
public com.badlogic.gdx.graphics.Texture getBannerTexture() -
getFont
-
getFont
-
getSound
Получает трек из последнего набора ресурсов, в котором все они есть -
getMenuXmSoundTrack
-
test
public void test()Description copied from interface:Manager
Запустить тестирование, чтобы проверить, все ли ресурсы есть (текстуры / i18n) Запускается после загрузки всех менеджеров- Specified by:
test
in interfaceManager
- Overrides:
test
in classManager.ManagerAdapter
-
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
-