Ejemplo n.º 1
0
  private void prepareShip() {

    ship = (Ship) WorldObjectPool.getInstance().reuse("Light-fighter");
    if (ship == null) {
      ship = new LightFighter(this, shipStartX, shipStartY);
      ManagerActor.getInstance().addEntityNext(ship);
    } else {
      ship.getBody().setTransform(shipStartX, shipStartY, ship.getBody().getAngle());
      ship.setShipController(this);
    }
  }
Ejemplo n.º 2
0
 @Override
 public boolean dispose() {
   WorldObjectPool.getInstance().cache(ship);
   return true;
 }