/** Remove a plug from the strategy * @param group Group to remove the plug from * @return removed plug, null if there was none for that group */ public GroupPlug unPlug (int group) { return plugs.remove(group); } }
/** Remove a plug from the strategy * @param group Group to remove the plug from * @return removed plug, null if there was none for that group */ public GroupPlug unPlug (int group) { return plugs.remove(group); } }
/** @param id tile's id to be removed */ public void removeTile (int id) { tiles.remove(id); }
/** @param id tile's id to be removed */ public void removeTile (int id) { tiles.remove(id); }
@Override public void onGamepadDisconnected (int index) { GwtController controller = controllerMap.remove(index); if (controller != null) { synchronized (eventQueue) { GwtControllerEvent event = eventPool.obtain(); event.type = GwtControllerEvent.DISCONNECTED; event.controller = controller; eventQueue.add(event); } } }
protected void removeController(int deviceId) { AndroidController controller = controllerMap.remove(deviceId); if(controller != null) { synchronized(eventQueue) { AndroidControllerEvent event = eventPool.obtain(); event.type = AndroidControllerEvent.DISCONNECTED; event.controller = controller; eventQueue.add(event); } Gdx.app.log(TAG, "removed controller '" + controller.getName() + "'"); } }
void freeSource (int sourceID) { if (noDevice) return; alSourceStop(sourceID); alSourcei(sourceID, AL_BUFFER, 0); if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } idleSources.add(sourceID); }
void freeSource (int sourceID) { if (noDevice) return; alSourceStop(sourceID); alSourcei(sourceID, AL_BUFFER, 0); if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } idleSources.add(sourceID); }
private static void onGamepadDisconnect(Gamepad gamepad) { consoleLog("onGamepadDisconnect: " + gamepad.getId()); gamepads.remove(gamepad.getIndex()); fireGamepadDisconnected(gamepad.getIndex()); }
void freeSource (int sourceID) { if (noDevice) return; alSourceStop(sourceID); alSourcei(sourceID, AL_BUFFER, 0); if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } idleSources.add(sourceID); }
void freeSource (int sourceID) { if (noDevice) return; alSourceStop(sourceID); alSourcei(sourceID, AL_BUFFER, 0); if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } idleSources.add(sourceID); }
void stopSourcesWithBuffer (int bufferID) { if (noDevice) return; for (int i = 0, n = idleSources.size; i < n; i++) { int sourceID = idleSources.get(i); if (alGetSourcei(sourceID, AL_BUFFER) == bufferID) { if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } alSourceStop(sourceID); } } }
void stopSourcesWithBuffer (int bufferID) { if (noDevice) return; for (int i = 0, n = idleSources.size; i < n; i++) { int sourceID = idleSources.get(i); if (alGetSourcei(sourceID, AL_BUFFER) == bufferID) { if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } alSourceStop(sourceID); } } }
void stopSourcesWithBuffer (int bufferID) { if (noDevice) return; for (int i = 0, n = idleSources.size; i < n; i++) { int sourceID = idleSources.get(i); if (alGetSourcei(sourceID, AL_BUFFER) == bufferID) { if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } alSourceStop(sourceID); } } }
void stopSourcesWithBuffer (int bufferID) { if (noDevice) return; for (int i = 0, n = idleSources.size; i < n; i++) { int sourceID = idleSources.get(i); if (alGetSourcei(sourceID, AL_BUFFER) == bufferID) { if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } alSourceStop(sourceID); } } }
void freeBuffer (int bufferID) { if (noDevice) return; for (int i = 0, n = idleSources.size; i < n; i++) { int sourceID = idleSources.get(i); if (alGetSourcei(sourceID, AL_BUFFER) == bufferID) { if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } alSourceStop(sourceID); alSourcei(sourceID, AL_BUFFER, 0); } } }
void freeBuffer (int bufferID) { if (noDevice) return; for (int i = 0, n = idleSources.size; i < n; i++) { int sourceID = idleSources.get(i); if (alGetSourcei(sourceID, AL_BUFFER) == bufferID) { if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } alSourceStop(sourceID); alSourcei(sourceID, AL_BUFFER, 0); } } }
void freeBuffer (int bufferID) { if (noDevice) return; for (int i = 0, n = idleSources.size; i < n; i++) { int sourceID = idleSources.get(i); if (alGetSourcei(sourceID, AL_BUFFER) == bufferID) { if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } alSourceStop(sourceID); alSourcei(sourceID, AL_BUFFER, 0); } } }
void freeBuffer (int bufferID) { if (noDevice) return; for (int i = 0, n = idleSources.size; i < n; i++) { int sourceID = idleSources.get(i); if (alGetSourcei(sourceID, AL_BUFFER) == bufferID) { if (sourceToSoundId.containsKey(sourceID)) { long soundId = sourceToSoundId.remove(sourceID); soundIdToSource.remove(soundId); } alSourceStop(sourceID); alSourcei(sourceID, AL_BUFFER, 0); } } }
private void gatherControllers(boolean sendEvent) { // gather all joysticks and gamepads, remove any disconnected ones IntMap<AndroidController> removedControllers = new IntMap<AndroidController>(); removedControllers.putAll(controllerMap); for(int deviceId: InputDevice.getDeviceIds()) { InputDevice device = InputDevice.getDevice(deviceId); AndroidController controller = controllerMap.get(deviceId); if(controller != null) { removedControllers.remove(deviceId); } else { addController(deviceId, sendEvent); } } for(Entry<AndroidController> entry: removedControllers.entries()) { removeController(entry.key); } }