SingleTap.java :  » Game » cgmd2010 » at » ac » tuwien » cg » cgmd » bifth2010 » level44 » io » Android Open Source

Android Open Source » Game » cgmd2010 
cgmd2010 » at » ac » tuwien » cg » cgmd » bifth2010 » level44 » io » SingleTap.java
package at.ac.tuwien.cg.cgmd.bifth2010.level44.io;

/**
 * Wrapper around the Input Gesture SingleTap
 * 
 * @author Matthias Tretter
 */
public class SingleTap implements InputGesture {
  /** the x-position of the tap */
  private float x;
  /** the y-position of the tap */
  private float y;

  /**
   * creates a Single-Tap
   * 
   * @param x
   *            x-pos
   * @param y
   *            y-pos
   */
  public SingleTap(float x, float y) {
    this.x = x;
    this.y = y;
  }

  @Override
  public float getEndX() {
    return x;
  }

  @Override
  public float getEndY() {
    return y;
  }

  @Override
  public float getStartX() {
    return x;
  }

  @Override
  public float getStartY() {
    return y;
  }

  @Override
  /**
   * A SingleTap has no strength
   * 
   * @return Always 0
   */
  public float getPower() {
    return 0;
  }

}
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.