com.badlogic.gdx.utils.IntSet Java Examples
The following examples show how to use
com.badlogic.gdx.utils.IntSet.
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: ControllerMappings.java From gdx-controllerutils with Apache License 2.0 | 6 votes |
/** * Some Controllers might have buttons or axis that are broken and always report a value. * Call this method before you begin to record mappings to ignore all those buttons and axis. * * @param controller controller to listen to */ public void recordButtonsToIgnoreForMapping(Controller controller) { buttonsToIgnoreForRecord = new IntSet(); axisToIgnoreForRecord = new IntSet(); int buttonFound = findPressedButton(controller); while (buttonFound >= 0) { buttonsToIgnoreForRecord.add(buttonFound); buttonFound = findPressedButton(controller); } int axisFound = findHighAxisValue(controller); while (axisFound >= 0) { axisToIgnoreForRecord.add(axisFound); axisFound = findHighAxisValue(controller); } }
Example #2
Source File: CaveGenerator.java From Cubes with MIT License | 5 votes |
public CaveGenerator(int x, int z, SmoothWorld smoothWorld) { this.caveStartX = x; this.caveStartY = smoothWorld.getSurfaceHeight(x, z); this.caveStartZ = z; this.smoothWorld = smoothWorld; long l = x + z + (x * (x - 1)) + (z * (z + 1)) + (long) Math.pow(x, z > 0 ? z : (z < 0 ? -z : 1)); this.numbers = new RandomXS128(smoothWorld.baseSeed, murmurHash3(smoothWorld.baseSeed + murmurHash3(l))); this.intSet = new IntSet(roomNodesMax); }