Revision 985f3dfa
Added by Leszek Koltunski about 3 years ago
src/main/java/org/distorted/main/RubikPreRender.java | ||
---|---|---|
55 | 55 |
void onActionFinished(long effectID); |
56 | 56 |
} |
57 | 57 |
|
58 |
private RubikSurfaceView mView; |
|
58 |
private final RubikSurfaceView mView;
|
|
59 | 59 |
private boolean mFinishRotation, mRemoveRotation, mRemovePatternRotation, mAddRotation, |
60 | 60 |
mSetQuat, mChangeObject, mSetupObject, mSolveObject, mScrambleObject, |
61 | 61 |
mInitializeObject, mSetTextureMap, mResetAllTextureMaps; |
... | ... | |
64 | 64 |
private ObjectList mNextObject; |
65 | 65 |
private int mNextSize; |
66 | 66 |
private long mRotationFinishedID; |
67 |
private long[] mEffectID; |
|
67 |
private final long[] mEffectID;
|
|
68 | 68 |
private boolean mIsNewRecord; |
69 | 69 |
private long mNewRecord; |
70 | 70 |
private int mScreenWidth; |
... | ... | |
230 | 230 |
mAddRotation = false; |
231 | 231 |
mAddRotationID = mNewObject.addNewRotation( mAddRotationAxis, mAddRotationRowBitmap, |
232 | 232 |
mAddRotationAngle, mAddRotationDuration, this); |
233 |
|
|
234 |
if( mAddRotationID==0 ) // failed to add effect - should never happen |
|
235 |
{ |
|
236 |
mCanRotate = true; |
|
237 |
mCanPlay = true; |
|
238 |
} |
|
233 | 239 |
} |
234 | 240 |
|
235 | 241 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Do not block the UI if, for some reason, some of the effects failed to get added to the Queue. Just fail to rotate.