Revision 61aa85e4
Added by Leszek Koltunski about 4 years ago
| src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java | ||
|---|---|---|
| 47 | 47 | 
    public TwistyMegaminx(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,  | 
| 48 | 48 | 
    DistortedEffects effects, int[][] moves, Resources res, int scrWidth)  | 
| 49 | 49 | 
        {
   | 
| 50 | 
        super(size, size, quat, texture, mesh, effects, moves, ObjectList.MEGA, res, scrWidth);
   | 
|
| 50 | 
    super(size, size, quat, texture, mesh, effects, moves, res, scrWidth);  | 
|
| 51 | 51 | 
    }  | 
| 52 | 52 | 
     | 
| 53 | 53 | 
    ///////////////////////////////////////////////////////////////////////////////////////////////////  | 
| ... | ... | |
| 430 | 430 | 
     | 
| 431 | 431 | 
    protected int getNumCubitVariants(int numLayers)  | 
| 432 | 432 | 
        {
   | 
| 433 | 
    int[] sizes = ObjectList.MEGA.getSizes();  | 
|
| 434 | 
    int variants = sizes.length;  | 
|
| 433 | 
    switch(numLayers)  | 
|
| 434 | 
          {
   | 
|
| 435 | 
    case 3: return 3;  | 
|
| 436 | 
    case 5: return 4;  | 
|
| 437 | 
    }  | 
|
| 435 | 438 | 
     | 
| 436 | 
        return 2+(sizes[variants-1]-1)/2;
   | 
|
| 439 | 
        return 3;
   | 
|
| 437 | 440 | 
    }  | 
| 438 | 441 | 
     | 
| 439 | 442 | 
    ///////////////////////////////////////////////////////////////////////////////////////////////////  | 
| ... | ... | |
| 452 | 455 | 
    return type+1;  | 
| 453 | 456 | 
    }  | 
| 454 | 457 | 
     | 
| 455 | 
    int[] sizes = ObjectList.MEGA.getSizes();  | 
|
| 456 | 
    int variants = sizes.length;  | 
|
| 457 | 
    int numShapes = 2+(sizes[variants-1]-1)/2;  | 
|
| 458 | 
     | 
|
| 459 | 
    return numShapes-1;  | 
|
| 458 | 
    return getNumCubitVariants(numLayers)-1;  | 
|
| 460 | 459 | 
    }  | 
| 461 | 460 | 
     | 
| 462 | 461 | 
    ///////////////////////////////////////////////////////////////////////////////////////////////////  | 
| ... | ... | |
| 602 | 601 | 
    return 4;  | 
| 603 | 602 | 
    }  | 
| 604 | 603 | 
     | 
| 604 | 
    ///////////////////////////////////////////////////////////////////////////////////////////////////  | 
|
| 605 | 
     | 
|
| 606 | 
    public ObjectList intGetObjectList(int numLayers)  | 
|
| 607 | 
        {
   | 
|
| 608 | 
    switch(numLayers)  | 
|
| 609 | 
          {
   | 
|
| 610 | 
    case 3: return ObjectList.MEGA_3;  | 
|
| 611 | 
    case 5: return ObjectList.MEGA_5;  | 
|
| 612 | 
    }  | 
|
| 613 | 
     | 
|
| 614 | 
    return ObjectList.MEGA_3;  | 
|
| 615 | 
    }  | 
|
| 616 | 
     | 
|
| 605 | 617 | 
    ///////////////////////////////////////////////////////////////////////////////////////////////////  | 
| 606 | 618 | 
     | 
| 607 | 619 | 
    public int getObjectName(int numLayers)  | 
Also available in: Unified diff
Simplify ObjectList: now there's just one object per size.