List of usage examples for com.badlogic.gdx.utils IntArray IntArray
public IntArray(boolean ordered, int capacity)
From source file:com.turbogerm.suchyblocks.GameArea.java
License:Open Source License
public GameArea(AssetManager assetManager, SpriteBatch batch, Vector2 gameAreaPosition) { mAssetManager = assetManager;//from w w w.j av a 2 s . c om mBatch = batch; mGameAreaPosition = gameAreaPosition; mGameAreaRectangle = new Rectangle(mGameAreaPosition.x, mGameAreaPosition.y, GAME_AREA_COLUMNS * SQUARE_SIZE, GAME_AREA_ROWS * SQUARE_SIZE); mSquareTextures = getSquareTextures(mAssetManager); IntPair[][][] tetrominoRotations = TetrominoRotationsReader .read(Gdx.files.internal(ResourceNames.TETROMINO_ROTATIONS_DATA)); mTetrominos = new Tetromino[Tetromino.COUNT]; for (int i = 0; i < Tetromino.COUNT; i++) { mTetrominos[i] = new Tetromino(tetrominoRotations[i], mSquareTextures[i], i); } mEmptySquareTextures = new Texture[2]; mEmptySquareTextures[0] = mAssetManager.get(ResourceNames.SQUARES_EMPTY_1_TEXTURE); mEmptySquareTextures[1] = mAssetManager.get(ResourceNames.SQUARES_EMPTY_2_TEXTURE); mGameAreaSquares = new int[GAME_AREA_ROWS][GAME_AREA_COLUMNS]; mLinesToRemove = new IntArray(false, LINES_TO_REMOVE_CAPACITY); reset(); }
From source file:com.weimingtom.iteye.simplerpg.tiled.TileMapRenderer.java
License:Apache License
private static IntArray createFromCSV(String values) { IntArray list = new IntArray(false, (values.length() + 1) / 2); StringTokenizer st = new StringTokenizer(values, ","); while (st.hasMoreTokens()) { list.add(Integer.parseInt(st.nextToken())); }//from ww w . jav a 2 s . c om list.shrink(); return list; }
From source file:net.onedaybeard.keyflection.KeyData.java
License:Apache License
KeyData(CommandController controller) {
pressedKeys = new IntArray(false, 7);
shortcuts = ShortcutConfigurator.create(controller);
this.controller = controller;
}