Project

General

Profile

« Previous | Next » 

Revision 7a733a8c

Added by Leszek Koltunski almost 3 years ago

Important bugfix: no we cannot unblock touch when WIN effect finishes, because

1) starting the WIN effect does not block touch in the first place
2) it can happen that this unblocking happens when we have started finishing the rotation but haven't removed it yet

If 2) happens and the user is swiping his finger, he is able to add a new rotation while the previous one hasn't been removed yet - with disastrous consequences.

View differences:

src/main/java/org/distorted/main/RubikSurfaceView.java
372 372
        float distNow  = (float)Math.sqrt( (x-x2)*(x-x2) + (y-y2)*(y-y2) );
373 373
        float distQuot = mInitDistance<0 ? 1.0f : distNow/ mInitDistance;
374 374
        mInitDistance = distNow;
375
/*
376
if( angleDiff< 0.00001f && angleDiff>-0.00001f)
377
  android.util.Log.e("D", " distQuot="+distQuot);
378
else
379
 android.util.Log.e("D", "angelDiff "+angleDiff+" distQuot="+distQuot);
380
*/
381 375
        TwistyObject object = mPreRender.getObject();
382 376
        if( object!=null ) object.setObjectRatio(distQuot);
383 377
        }

Also available in: Unified diff