Revision a1bcb301
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/main/ObjectControl.java | ||
---|---|---|
251 | 251 |
|
252 | 252 |
private void finishRotation() |
253 | 253 |
{ |
254 |
computeCurrentSpeedInInchesPerSecond(); |
|
255 | 254 |
TwistyObject object = mPreRender.getObject(); |
256 |
int angle = object.computeNearestAngle(mCurrentAxis,mCurrentAngle, mCurrRotSpeed); |
|
257 |
mPreRender.finishRotation(angle); |
|
258 |
mPreRender.rememberMove(mCurrentAxis,mCurrentRow,angle); |
|
255 |
int[] angles = object.getBasicAngle(); |
|
259 | 256 |
|
260 |
if( angle!=0 )
|
|
257 |
if( mCurrentAxis<angles.length )
|
|
261 | 258 |
{ |
262 |
int basicAngle= object.getBasicAngle()[mCurrentAxis]; |
|
263 |
int realAngle = (angle*basicAngle)/360; |
|
264 |
mInterface.onFinishRotation(mCurrentAxis,mCurrentRow,realAngle); |
|
265 |
} |
|
259 |
computeCurrentSpeedInInchesPerSecond(); |
|
260 |
|
|
261 |
int angle = object.computeNearestAngle(mCurrentAxis,mCurrentAngle, mCurrRotSpeed); |
|
262 |
mPreRender.finishRotation(angle); |
|
263 |
mPreRender.rememberMove(mCurrentAxis,mCurrentRow,angle); |
|
264 |
|
|
265 |
if( angle!=0 ) |
|
266 |
{ |
|
267 |
int basicAngle= angles[mCurrentAxis]; |
|
268 |
int realAngle = (angle*basicAngle)/360; |
|
269 |
mInterface.onFinishRotation(mCurrentAxis,mCurrentRow,realAngle); |
|
270 |
} |
|
266 | 271 |
|
267 |
mContinuingRotation = false; |
|
268 |
mBeginningRotation = false; |
|
269 |
mDragging = true; |
|
272 |
mContinuingRotation = false; |
|
273 |
mBeginningRotation = false; |
|
274 |
mDragging = true; |
|
275 |
} |
|
270 | 276 |
} |
271 | 277 |
|
272 | 278 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Bugfixes for crashes from Firebase.