Project

General

Profile

« Previous | Next » 

Revision 2df35810

Added by Leszek Koltunski over 2 years ago

Simplifications

View differences:

src/main/java/org/distorted/objectlib/main/ObjectControl.java
249 249
    private void finishRotation()
250 250
      {
251 251
      computeCurrentSpeedInInchesPerSecond();
252
      int angle = mPreRender.getObject().computeNearestAngle(mCurrentAxis,mCurrentAngle, mCurrRotSpeed);
252
      TwistyObject object = mPreRender.getObject();
253
      int angle = object.computeNearestAngle(mCurrentAxis,mCurrentAngle, mCurrRotSpeed);
253 254
      mPreRender.finishRotation(angle);
254 255
      mPreRender.rememberMove(mCurrentAxis,mCurrentRow,angle);
255 256

  
256 257
      if( angle!=0 )
257 258
        {
258 259
        TwistyActivity act = mAct.get();
259
        mActioner.onFinishRotation(act,mCurrentAxis,mCurrentRow,angle);
260

  
261
        int basicAngle= object.getBasicAngle()[mCurrentAxis];
262
        int realAngle = (angle*basicAngle)/360;
263

  
264
        mActioner.onFinishRotation(act,mCurrentAxis,mCurrentRow,realAngle);
260 265
        }
261 266

  
262 267
      mContinuingRotation = false;
......
657 662

  
658 663
///////////////////////////////////////////////////////////////////////////////////////////////////
659 664

  
660
    public void addRotation(MovesFinished listener, int axis, int rowBitmap, int angle, long duration)
665
    public void addRotation(MovesFinished listener, int axis, int rowBitmap, int angle, int duration)
661 666
      {
662 667
      mPreRender.addRotation(listener,axis,rowBitmap,angle,duration);
663 668
      }

Also available in: Unified diff