Example #1
0
  private void spawnAtacker(float x, float y) {
    this.ship = new LightFighter(this, x, y);
    ManagerActor.getInstance().addEntityNext(ship);
    ship.setTarget(target);
    ship.followTarget(true);

    ship.setLightColor(Color.RED);
    ship.toggleLights();
  }
Example #2
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);
    }
  }