Project

General

Profile

« Previous | Next » 

Revision 11fa413d

Added by Leszek Koltunski over 2 years ago

Make the ShapeChanging the default TouchControl during MODE_REPLACE.

View differences:

src/main/java/org/distorted/objectlib/main/TwistyObject.java
1127 1127
    float scale = mObjectScreenRatio*mInitScreenRatio*nodeSize/mSize;
1128 1128
    mObjectScale.set(scale,scale,scale);
1129 1129

  
1130
    if( mTouchControl ==null ) mTouchControl = getMovement();
1130
    if( mTouchControl ==null ) mTouchControl = getTouchControl();
1131 1131
    mTouchControl.setObjectRatio(mObjectScreenRatio*mInitScreenRatio);
1132 1132
    }
1133 1133

  
......
1157 1157
    return mObjectScreenRatio;
1158 1158
    }
1159 1159

  
1160
///////////////////////////////////////////////////////////////////////////////////////////////////
1161

  
1162
  public float getObjectRatio()
1163
    {
1164
    return mObjectScreenRatio*mInitScreenRatio;
1165
    }
1166

  
1160 1167
///////////////////////////////////////////////////////////////////////////////////////////////////
1161 1168

  
1162 1169
  boolean isSolved()
......
1325 1332

  
1326 1333
///////////////////////////////////////////////////////////////////////////////////////////////////
1327 1334

  
1328
  public TouchControl getMovement()
1335
  public TouchControl getTouchControl()
1329 1336
    {
1330 1337
    if( mTouchControl==null )
1331 1338
      {
1332
      switch(getMovementType())
1339
      switch(getTouchControlType())
1333 1340
        {
1334 1341
        case TC_TETRAHEDRON : mTouchControl = new TouchControlTetrahedron(this);
1335 1342
                              break;
......
1369 1376

  
1370 1377
  // for JSON only
1371 1378
  public abstract int getSolvedFunctionIndex();
1372
  public abstract int getMovementType();
1373
  public abstract int getMovementSplit();
1379
  public abstract int getTouchControlType();
1380
  public abstract int getTouchControlSplit();
1374 1381
  public abstract boolean[][] getLayerRotatable(int[] numLayers);
1375 1382
  public abstract int[][][] getEnabled();
1376 1383
  public abstract float[] getDist3D(int[] numLayers);

Also available in: Unified diff