AIController.java :  » Game » infinitewars » ai » Java Open Source

Java Open Source » Game » infinitewars 
infinitewars » ai » AIController.java
package ai;

import com.jme.math.Vector3f;

import logic.NodeController;
import logic.common.player.Player;
import logic.ships.moveableShip.MovableShip;

/**
 * An abstract Controller for Artificial Intelligence.
 * 
 * @author Wasserleiche
 */
public abstract class AIController extends NodeController {
  
  private static final long serialVersionUID = 1L;
  
  /** The {@link Player} that is controlled by this Controller. */
  protected MovableShip ship;
  
  public AIController(MovableShip ship) { this(ship, 0f); }
  
  /**
   * Constructs a new AIController with the given {@link Player}.
   * @param bot The {@link Player} that shall be controlled by this Controller.
   */
  public AIController(MovableShip ship, float updateDelay) {
    super(updateDelay, ship);
    this.ship = ship;
  }
  
  protected void rotateTo(float amount, Vector3f loc) {
    rotateTo(loc, amount, false);
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.