Revision 318c0a7d
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/main/RubikActivity.java | ||
---|---|---|
40 | 40 |
import org.distorted.library.type.Static4D; |
41 | 41 |
|
42 | 42 |
import org.distorted.objectlib.main.TwistyObject; |
43 |
import org.distorted.objectlib.main.ObjectList;
|
|
43 |
import org.distorted.objectlib.main.ObjectType;
|
|
44 | 44 |
|
45 | 45 |
import org.distorted.dialogs.RubikDialogError; |
46 | 46 |
import org.distorted.dialogs.RubikDialogPrivacy; |
... | ... | |
277 | 277 |
RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getScreenClass(); |
278 | 278 |
int object = play.getObject(); |
279 | 279 |
|
280 |
if( object>=0 && object< ObjectList.NUM_OBJECTS )
|
|
280 |
if( object>=0 && object< ObjectType.NUM_OBJECTS )
|
|
281 | 281 |
{ |
282 | 282 |
success = true; |
283 |
ObjectList nextObj = ObjectList.values()[object];
|
|
283 |
ObjectType nextObj = ObjectType.values()[object];
|
|
284 | 284 |
view.getPreRender().changeObject(nextObj); |
285 | 285 |
} |
286 | 286 |
|
287 | 287 |
if( !success ) |
288 | 288 |
{ |
289 |
ObjectList obj = ObjectList.getObject(RubikScreenPlay.DEF_OBJECT);
|
|
289 |
ObjectType obj = ObjectType.getObject(RubikScreenPlay.DEF_OBJECT);
|
|
290 | 290 |
play.setObject(this,obj); |
291 | 291 |
view.getPreRender().changeObject(obj); |
292 | 292 |
} |
... | ... | |
457 | 457 |
|
458 | 458 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
459 | 459 |
|
460 |
public void changeObject(ObjectList newObject, boolean reportChange)
|
|
460 |
public void changeObject(ObjectType newObject, boolean reportChange)
|
|
461 | 461 |
{ |
462 | 462 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
463 | 463 |
RubikPreRender pre = view.getPreRender(); |
... | ... | |
468 | 468 |
|
469 | 469 |
if( oldObject!=null ) |
470 | 470 |
{ |
471 |
ObjectList oldList = oldObject.getObjectList();
|
|
471 |
ObjectType oldList = oldObject.getObjectList();
|
|
472 | 472 |
float fps = view.getRenderer().getFPS(); |
473 | 473 |
fps = (int)(fps+0.5f); |
474 | 474 |
StringBuilder name = new StringBuilder(); |
... | ... | |
501 | 501 |
|
502 | 502 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
503 | 503 |
|
504 |
public void setupObject(ObjectList object, int[][] moves)
|
|
504 |
public void setupObject(ObjectType object, int[][] moves)
|
|
505 | 505 |
{ |
506 | 506 |
RubikSurfaceView view = findViewById(R.id.rubikSurfaceView); |
507 | 507 |
RubikPreRender pre = view.getPreRender(); |
... | ... | |
628 | 628 |
|
629 | 629 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
630 | 630 |
|
631 |
public void switchTutorial(String url, ObjectList object)
|
|
631 |
public void switchTutorial(String url, ObjectType object)
|
|
632 | 632 |
{ |
633 | 633 |
Intent myIntent = new Intent(this, TutorialActivity.class); |
634 | 634 |
myIntent.putExtra("url", url); |
Also available in: Unified diff
Reename ObjectList to a more logical ObjectType.