public void onAbsorb(int velocity) {mState = STATE_ABSORB;velocity = Math.max(MIN_VELOCITY, Math.abs(velocity));mStartTime = AnimationUtils.currentAnimationTimeMillis();mDuration = 0.1f + (velocity * 0.03f);mEdgeAlphaStart = 0.f;mEdgeScaleY = mEdgeScaleYStart = 0.f;mGlowAlphaStart = 0.5f;mGlowScaleYStart = 0.f;mEdgeAlphaFinish = Math.max(0, Math.min(velocity * VELOCITY_EDGE_FACTOR, 1));mEdgeScaleYFinish = Math.max(HELD_EDGE_SCALE_Y, Math.min(velocity * VELOCITY_EDGE_FACTOR, 1.f));mGlowScaleYFinish = Math.min(0.025f + (velocity * (velocity / 100) * 0.00015f), 1.75f);mGlowAlphaFinish = Math.max(mGlowAlphaStart, Math.min(velocity * VELOCITY_GLOW_FACTOR * .00001f, MAX_ALPHA));}
public virtual void onAbsorb(int velocity){mState = STATE_ABSORB;velocity = System.Math.Max(MIN_VELOCITY, System.Math.Abs(velocity));mStartTime = android.view.animation.AnimationUtils.currentAnimationTimeMillis();mDuration = 0.1f + (velocity * 0.03f);mEdgeAlphaStart = 0.0f;mEdgeScaleY = mEdgeScaleYStart = 0.0f;mGlowAlphaStart = 0.5f;mGlowScaleYStart = 0.0f;mEdgeAlphaFinish = System.Math.Max(0, System.Math.Min(velocity * VELOCITY_EDGE_FACTOR, 1));mEdgeScaleYFinish = System.Math.Max(HELD_EDGE_SCALE_Y, System.Math.Min(velocity *VELOCITY_EDGE_FACTOR, 1.0f));mGlowScaleYFinish = System.Math.Min(0.025f + (velocity * (velocity / 100) * 0.00015f), 1.75f);mGlowAlphaFinish = System.Math.Max(mGlowAlphaStart, System.Math.Min(velocity * VELOCITY_GLOW_FACTOR* .00001f, MAX_ALPHA));}