Java Code Examples for com.badlogic.gdx.utils.IntArray#toArray()
The following examples show how to use
com.badlogic.gdx.utils.IntArray#toArray() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PatternModifier.java From beatoraja with GNU General Public License v3.0 | 6 votes |
/** * 変更対象のレーン番号が格納された配列を返す * @param mode * プレイモード * @param containsScratch * スクラッチレーンを含むか * @return レーン番号の配列 */ protected int[] getKeys(Mode mode, boolean containsScratch) { int key = (modifyTargetSide == SIDE_2P) ? mode.key / mode.player : 0; if (key == mode.key) { return new int[0]; } else { IntArray keys = new IntArray(); for (int i = 0; i < mode.key / mode.player; i++) { if (containsScratch || !mode.isScratchKey(key + i)) { keys.add(key + i); } } return keys.toArray(); } }
Example 2
Source File: LR2SkinCSVLoader.java From beatoraja with GNU General Public License v3.0 | 5 votes |
protected int[] readOffset(String[] str, int startIndex, int[] offset) { IntArray result = new IntArray(); for(int i : offset) { result.add(i); } for (int i = startIndex; i < str.length; i++) { String s = str[i].replaceAll("[^0-9-]", ""); if(s.length() > 0) { result.add(Integer.parseInt(s)); } } return result.toArray(); }