Class AssetManager

java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.AssetManager
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, Manager

public class AssetManager extends Manager.ManagerAdapter
  • Field Details

    • BLANK_REGION_NAME

      public static final String 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

      public com.badlogic.gdx.graphics.g2d.ParticleEffectPool getParticleEffectPool(String particleName)
    • clearCacheDir

      public static void clearCacheDir()
    • localOrInternalFile

      public static com.badlogic.gdx.files.FileHandle localOrInternalFile(String path)
    • loadWebTexture

      public AssetManager.WebTextureRegion loadWebTexture(String src)
    • loadWebTexture

      public AssetManager.WebTextureRegion loadWebTexture(String src, boolean ignoreCache)
    • getModel

      public void getModel(String fileName, ObjectConsumer<com.badlogic.gdx.graphics.g3d.Model> onReady)
    • getSceneModelIfLoaded

      public com.badlogic.gdx.graphics.g3d.Model getSceneModelIfLoaded()
    • getSceneModel

      public void getSceneModel(ObjectConsumer<com.badlogic.gdx.graphics.g3d.Model> onReady)
    • replaceRegionAliasesWithChars

      public CharSequence replaceRegionAliasesWithChars(CharSequence str)
      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 interface Manager
      Overrides:
      setup in class Manager.ManagerAdapter
    • getFontScaleMultiplier

      public float getFontScaleMultiplier(int fontSize)
      Depens only on "lage fonts" setting
    • getColor

      public com.badlogic.gdx.graphics.Color getColor(String colorAlias)
    • getQuad

      public Quad getQuad(String alias)
      May return Quad.getNoQuad() if not found
    • getQuadOrNull

      @Null public Quad getQuadOrNull(String alias)
    • getTextureRegion

      public ResourcePack.AtlasTextureRegion getTextureRegion(String regionAlias)
    • 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

      public com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable getDrawable(String regionAlias)
      Возвращает всегда один и тот же Drawable с указанным алиасом региона.
    • getOverlayBackground

      public com.badlogic.gdx.scenes.scene2d.utils.Drawable getOverlayBackground()
    • getBlankWhiteTextureRegion

      public ResourcePack.AtlasTextureRegion 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

      public ResourcePack.ResourcePackBitmapFont getFont(int size)
    • getFont

      public ResourcePack.ResourcePackBitmapFont getFont(int size, boolean hasMarkup)
    • getSound

      public StaticSound getSound(StaticSoundType soundType)
      Получает трек из последнего набора ресурсов, в котором все они есть
    • getMenuXmSoundTrack

      public Module getMenuXmSoundTrack()
    • test

      public void test()
      Description copied from interface: Manager
      Запустить тестирование, чтобы проверить, все ли ресурсы есть (текстуры / i18n) Запускается после загрузки всех менеджеров
      Specified by:
      test in interface Manager
      Overrides:
      test in class Manager.ManagerAdapter
    • dispose

      public void dispose()
      Description copied from interface: com.badlogic.gdx.utils.Disposable
      Releases all resources of this object.
      Specified by:
      dispose in interface com.badlogic.gdx.utils.Disposable
      Overrides:
      dispose in class Manager.ManagerAdapter