Beispiel #1
0
  public void release(final int x, final int y) {
    m_timer.stop();
    m_stop = new Vector2i(x, y);

    final double threshould_time = 500.0;
    final double tolerance_auto_len = 2.0;
    final double tolerance_slow_len = 80.0;

    final double length = (m_start.sub(m_stop)).length();

    if (m_timer.msec() < threshould_time) {
      if (length > tolerance_auto_len) {
        m_is_auto = true;
        m_is_slow = length < tolerance_slow_len;
      }
    }
  }
Beispiel #2
0
  public void press(final int x, final int y) {
    m_old = new Vector2i(x, y);
    m_new = new Vector2i(x, y);
    m_start = new Vector2i(x, y);

    m_timer.start();
    m_is_auto = false;
    m_is_slow = false;
  }