Class GameSystemProvider.ThreadSafeSharedHelpers

java.lang.Object
com.prineside.tdi2.GameSystemProvider.ThreadSafeSharedHelpers
Enclosing class:
GameSystemProvider

public static final class GameSystemProvider.ThreadSafeSharedHelpers extends Object
Thread-local objects, stored in S.TSH Each GameSystemProvider has a single instance of this class and provides objects that were usually available as a regular static fields / singletons Since static fields can not be used in a multithreaded environment and ThreadLocal may get costly
  • Field Details

    • MAX_ENEMY_ARRAYS

      public static final int MAX_ENEMY_ARRAYS
      See Also:
    • MAX_TOWER_ARRAYS

      public static final int MAX_TOWER_ARRAYS
      See Also:
    • MAX_TILE_ARRAYS

      public static final int MAX_TILE_ARRAYS
      See Also:
    • sort

      public final com.badlogic.gdx.utils.Sort sort
    • floatSorter

      public final FloatSorter floatSorter
  • Constructor Details

    • ThreadSafeSharedHelpers

      public ThreadSafeSharedHelpers()
  • Method Details

    • getEnemyArray

      public com.badlogic.gdx.utils.Array<Enemy> getEnemyArray()
    • freeEnemyArray

      public void freeEnemyArray(com.badlogic.gdx.utils.Array<Enemy> array)
    • getTowerArray

      public com.badlogic.gdx.utils.Array<Tower> getTowerArray()
    • freeTowerArray

      public void freeTowerArray(com.badlogic.gdx.utils.Array<Tower> array)
    • getTileArray

      public com.badlogic.gdx.utils.Array<Tile> getTileArray()
    • freeTileArray

      public void freeTileArray(com.badlogic.gdx.utils.Array<Tile> array)