Examples of pushPosition()


Examples of net.shadewind.racetrack.Car.pushPosition()

    List<Vector2i> startPositions = map.getStartPositions();
    int position = 0;
    cars.clear();
    for (Client c : clients) {
      Car car = new Car();
      car.pushPosition(startPositions.get(position));
      cars.put(c, car);
      position = (position + 1) % startPositions.size();
    }
   
    for (Client c : clients) {
View Full Code Here

Examples of net.shadewind.racetrack.Car.pushPosition()

    Player player = players.get(playerId);
    if (player == null)
      throw new CommException("Unknown player id = " + playerId);
    Car car = player.getCar();
    car.reset();
    car.pushPosition(new Vector2i(
        command.intArgument(1),
        command.intArgument(2)));
    listener.carReset(player);
  }
 
View Full Code Here

Examples of net.shadewind.racetrack.Car.pushPosition()

    Player player = players.get(command.intArgument(0));
    if (player == null)
      throw new CommException("Player is unknown.");
   
    Car car = player.getCar();
    car.pushPosition(new Vector2i(command.intArgument(1), command.intArgument(2)));
    car.setVelocity(new Vector2i(command.intArgument(3), command.intArgument(4)));
    listener.carDriven(player);
  }
 
  private void processCarCrashed(Command command) throws CommException
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.