Home | History | Annotate | Download | only in controllersample

Lines Matching refs:ship

48  * a bullet is fired or the ship crashes into an obstacle. Otherwise, the system
62 * Each ship is created as an event comes in from a new Joystick device
64 private final SparseArray<Ship> mShips;
87 mShips = new SparseArray<Ship>();
111 // Iterate through the input devices, looking for controllers. Create a ship
118 // if the device is a gamepad/joystick, create a ship to represent it
131 Ship currentShip = getShipForId(deviceId);
145 Ship currentShip = getShipForId(deviceId);
168 Ship curShip = getShipForId(id);
189 Ship currentShip = mShips.valueAt(i);
219 Ship currentShip = mShips.valueAt(i);
250 private Ship getShipForId(int shipID) {
251 Ship currentShip = mShips.get(shipID);
254 // do we know something about this ship already?
270 // do we already have a ship with this color?
282 currentShip = new Ship(shipColor);
287 currentShip = new Ship(getNextShipColor());
300 * Remove the ship from the array of active ships by ID.
328 Ship currentShip = mShips.valueAt(i);
372 // Check for collisions between the ship and obstacles --- this could
377 Ship currentShip = mShips.valueAt(j);
389 // Avoid putting them right on top of the ship.
420 Ship currentShip = mShips.valueAt(i);
576 * it for, so we can have an extended death sequence when a ship or
616 * Returns the next ship color in the sequence. Very simple. Does not in any
620 * @return an int containing the index of the next ship color
633 * Static constants associated with Ship inner class
639 private class Ship extends Sprite {
646 // The ship actually determines the speed of the bullet, not the bullet
655 // The current device that is controlling the ship
671 public Ship(int colorIndex) {
730 * Firing is a unique case where a ship creates a bullet. A bullet needs
731 * to be created with a position near the ship that is firing with a
732 * velocity that is based upon the speed of the ship.
814 * The ship directly handles joystick input.
846 // Set the ship heading.
867 * Set the game controller to be used to control the ship.
869 * @param dev the input device that will be controlling the ship
928 * Bring our ship
947 * direction of the ship
957 * direction of the ship
967 * direction of the ship
977 * direction of the ship
985 * of the ship. In theory, this should be scaled according to the
1125 * When an input device is added, we add a ship based upon the device.
1138 * this to make sure that the ship has an up-to-date InputDevice.
1145 Ship ship = getShipForId(deviceId);
1146 ship.setInputDevice(InputDevice.getDevice(deviceId));
1150 * Remove any ship associated with the ID.