Revision d433b50e
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/tutorials/TutorialScreen.java | ||
---|---|---|
29 | 29 |
import org.distorted.helpers.LockController; |
30 | 30 |
import org.distorted.main.R; |
31 | 31 |
import org.distorted.main.RubikActivity; |
32 |
import org.distorted.objects.RubikObject; |
|
33 |
import org.distorted.objects.RubikObjectList; |
|
32 | 34 |
import org.distorted.screens.RubikScreenPlay; |
33 | 35 |
import org.distorted.screens.ScreenList; |
34 | 36 |
import org.distorted.helpers.TransparentImageButton; |
... | ... | |
74 | 76 |
public void onClick(View v) |
75 | 77 |
{ |
76 | 78 |
RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getScreenClass(); |
77 |
int numScrambles = play.getObject().getNumScramble(); |
|
79 |
int object = play.getObject(); |
|
80 |
RubikObject obj = RubikObjectList.getObject(object); |
|
81 |
int numScrambles = obj==null ? 0 : obj.getNumScramble(); |
|
78 | 82 |
act.getControl().scrambleObject(numScrambles); |
79 | 83 |
} |
80 | 84 |
}); |
Also available in: Unified diff
In the 'magic' app, ObjectType is now only used in RubikObject and RubikObjectList classes and nowhere else.
This is a major step towards being able to download objects from an online repository.