Project

General

Profile

« Previous | Next » 

Revision e8d8c12a

Added by Leszek Koltunski over 1 year ago

Don't do slow scramblng if numScrambles>=50 - do a fast scramble instead.

View differences:

src/main/java/org/distorted/objectlib/main/ObjectPreRender.java
32 32

  
33 33
public class ObjectPreRender implements EffectListener
34 34
  {
35
  private static final int MAX_SLOW_SCRAMBLE = 50;
36

  
35 37
  private final ObjectControl mController;
36 38
  private InputStream mJsonStream, mMeshStream;
37 39
  private int mOrdinal;
......
273 275
    mScrambleObject = false;
274 276
    mIsSolved       = false;
275 277
    blockEverything(BlockController.PLACE_3);
276
    int duration = BaseEffect.Type.SCRAMBLE.getDuration();
277
    doEffectNow( BaseEffect.Type.SCRAMBLE, duration );
278

  
279
    if( mScrambleObjectNum<MAX_SLOW_SCRAMBLE )
280
      {
281
      int duration = BaseEffect.Type.SCRAMBLE.getDuration();
282
      doEffectNow( BaseEffect.Type.SCRAMBLE, duration );
283
      }
284
    else
285
      {
286
      int duration = BaseEffect.Type.FAST_SCRAMBLE.getDuration();
287
      doEffectNow( BaseEffect.Type.FAST_SCRAMBLE, duration );
288
      }
278 289
    }
279 290

  
280 291
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/objectlib/main/ObjectType.java
57 57
  KILO_3 ( TwistyKilominx.class       , 18, R.drawable.kilo_3, true,    50, new InitData(new int[] {3,3,3,3,3,3})),
58 58
  MEGA_3 ( TwistyMegaminx.class       , 21, R.drawable.mega_3, true,     0, new InitData(new int[] {3,3,3,3,3,3})),
59 59
  KILO_5 ( TwistyKilominx.class       , 33, R.drawable.kilo_5, true,    80, new InitData(new int[] {5,5,5,5,5,5})),
60
  MEGA_5 ( TwistyMegaminx.class       , 37, R.drawable.mega_5, true,   100, new InitData(new int[] {5,5,5,5,5,5})),
60
  MEGA_5 ( TwistyMegaminx.class       , 40, R.drawable.mega_5, true,   100, new InitData(new int[] {5,5,5,5,5,5})),
61 61

  
62 62
  TRAJ_3 ( TwistyTrajber.class        , 17, R.drawable.traj_3, true,    50, new InitData(new int[] {3,3,3})),
63 63
  TRAJ_4 ( TwistyTrajber.class        , 24, R.drawable.traj_4, true,    60, new InitData(new int[] {4,4,4})),

Also available in: Unified diff