Example #1
0
  public void startHover(float hx, float hy) {
    m_hoverSprite.setVisible(true);
    m_hoverSprite.setPosition(hx, hy);

    m_dy = 0;
    m_dx = 0;

    m_hover = true;
    this.stopAllAnimations();
    m_startHoverAnimation = new AnimateMoveTo(0.2f, this.getX(), this.getY(), hx, hy + 18);
    this.chainAnimations(m_startHoverAnimation, m_hoverAnimation);

    if ((m_hoverSpeed + 6) > maxSpeedX) maxSpeedX = m_hoverSpeed + 6;
  }
Example #2
0
  public void stopHover(boolean forReals) {
    if (m_hover) {
      m_hoverSprite.setVisible(false);
      this.stopAllAnimations();
      m_hover = false;
      m_dx = 0;
      m_dy = 0;
      m_climbing = false;
      m_inSwamp = false;
      maxSpeedX = defaultMaxSpeedX;
      if (forReals) {
        m_gameLayer.setPlayerXOffsetTarget(0);
      }
    }

    if (m_wrappedUp) {
      m_wrappedUp = false;
      this.stopAllAnimations();
    }
  }