27 |
27 |
import org.distorted.objects.ObjectList;
|
28 |
28 |
import org.distorted.objects.TwistyObject;
|
29 |
29 |
import org.distorted.main.RubikPreRender.ActionFinishedListener;
|
|
30 |
import org.distorted.scores.RubikScores;
|
30 |
31 |
|
31 |
32 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
32 |
33 |
|
... | ... | |
35 |
36 |
private ActionFinishedListener mAddActionListener;
|
36 |
37 |
private TutorialSurfaceView mView;
|
37 |
38 |
private boolean mFinishRotation, mRemoveRotation, mAddRotation,
|
38 |
|
mSetQuat, mChangeObject, mSetupObject, mSolveObject,
|
|
39 |
mSetQuat, mChangeObject, mSetupObject, mSolveObject, mScrambleObject,
|
39 |
40 |
mInitializeObject, mResetAllTextureMaps, mRemovePatternRotation;
|
40 |
41 |
private boolean mCanPlay;
|
41 |
42 |
private boolean mIsSolved;
|
... | ... | |
49 |
50 |
private long mAddRotationDuration;
|
50 |
51 |
private long mAddRotationID, mRemoveRotationID;
|
51 |
52 |
private int mNearestAngle;
|
|
53 |
private int mScrambleObjectNum;
|
52 |
54 |
|
53 |
55 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
54 |
56 |
|
... | ... | |
63 |
65 |
mChangeObject = false;
|
64 |
66 |
mSetupObject = false;
|
65 |
67 |
mSolveObject = false;
|
|
68 |
mScrambleObject = false;
|
|
69 |
|
66 |
70 |
mCanPlay = true;
|
67 |
71 |
mOldObject = null;
|
68 |
72 |
mNewObject = null;
|
69 |
|
mScreenWidth = 0;
|
|
73 |
|
|
74 |
mScreenWidth = 0;
|
|
75 |
mScrambleObjectNum = 0;
|
70 |
76 |
|
71 |
77 |
mRemovePatternRotation= false;
|
72 |
78 |
}
|
... | ... | |
219 |
225 |
doEffectNow( BaseEffect.Type.SOLVE );
|
220 |
226 |
}
|
221 |
227 |
|
|
228 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
229 |
|
|
230 |
private void scrambleObjectNow()
|
|
231 |
{
|
|
232 |
mScrambleObject = false;
|
|
233 |
mCanPlay = false;
|
|
234 |
mIsSolved = false;
|
|
235 |
RubikScores.getInstance().incrementNumPlays();
|
|
236 |
doEffectNow( BaseEffect.Type.SCRAMBLE );
|
|
237 |
}
|
|
238 |
|
222 |
239 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
223 |
240 |
|
224 |
241 |
private void initializeObjectNow()
|
... | ... | |
296 |
313 |
if( mChangeObject ) changeObjectNow();
|
297 |
314 |
if( mSetupObject ) setupObjectNow();
|
298 |
315 |
if( mSolveObject ) solveObjectNow();
|
|
316 |
if( mScrambleObject ) scrambleObjectNow();
|
299 |
317 |
if( mAddRotation ) addRotationNow();
|
300 |
318 |
if( mInitializeObject ) initializeObjectNow();
|
301 |
319 |
if( mResetAllTextureMaps ) resetAllTextureMapsNow();
|
... | ... | |
329 |
347 |
|
330 |
348 |
public int getNumScrambles()
|
331 |
349 |
{
|
332 |
|
return 0;
|
|
350 |
return mScrambleObjectNum;
|
333 |
351 |
}
|
334 |
352 |
|
335 |
353 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
... | ... | |
342 |
360 |
}
|
343 |
361 |
}
|
344 |
362 |
|
|
363 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
364 |
|
|
365 |
public void scrambleObject(int num)
|
|
366 |
{
|
|
367 |
if( mCanPlay )
|
|
368 |
{
|
|
369 |
mScrambleObject = true;
|
|
370 |
mScrambleObjectNum = num;
|
|
371 |
}
|
|
372 |
}
|
|
373 |
|
345 |
374 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
346 |
375 |
|
347 |
376 |
public void resetAllTextureMaps()
|
Progress creating the Tutorial Activity.