Project

General

Profile

« Previous | Next » 

Revision 61aa85e4

Added by Leszek Koltunski over 2 years ago

Simplify ObjectList: now there's just one object per size.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java
46 46
  public TwistyKilominx(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
47 47
                        DistortedEffects effects, int[][] moves, Resources res, int scrWidth)
48 48
    {
49
    super(size, size, quat, texture, mesh, effects, moves, ObjectList.KILO, res, scrWidth);
49
    super(size, size, quat, texture, mesh, effects, moves, res, scrWidth);
50 50
    }
51 51

  
52 52
///////////////////////////////////////////////////////////////////////////////////////////////////
......
514 514

  
515 515
  protected int getNumCubitVariants(int numLayers)
516 516
    {
517
    int[] sizes = ObjectList.KILO.getSizes();
518
    int variants = sizes.length;
519
    int highestSize = sizes[variants-1];
517
    switch(numLayers)
518
      {
519
      case 3: return 1;
520
      case 5: return 4;
521
      }
520 522

  
521
    return highestSize-1;
523
    return 1;
522 524
    }
523 525

  
524 526
///////////////////////////////////////////////////////////////////////////////////////////////////
......
537 539
      return type+1;
538 540
      }
539 541

  
540
    int[] sizes = ObjectList.KILO.getSizes();
541
    int variants = sizes.length;
542
    int highestSize = sizes[variants-1];
543

  
544
    return highestSize-2;
542
    return getNumCubitVariants(numLayers)-1;
545 543
    }
546 544

  
547 545
///////////////////////////////////////////////////////////////////////////////////////////////////
......
696 694
    return 2;
697 695
    }
698 696

  
697
///////////////////////////////////////////////////////////////////////////////////////////////////
698

  
699
  public ObjectList intGetObjectList(int numLayers)
700
    {
701
    switch(numLayers)
702
      {
703
      case 3: return ObjectList.KILO_3;
704
      case 5: return ObjectList.KILO_5;
705
      }
706

  
707
    return ObjectList.KILO_3;
708
    }
709

  
699 710
///////////////////////////////////////////////////////////////////////////////////////////////////
700 711

  
701 712
  public int getObjectName(int numLayers)

Also available in: Unified diff