Revision c3ffcf58
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/magic/RubikActivity.java | ||
---|---|---|
31 | 31 |
import org.distorted.effect.BaseEffect; |
32 | 32 |
import org.distorted.library.main.DistortedLibrary; |
33 | 33 |
|
34 |
import org.distorted.scores.RubikScores; |
|
34 | 35 |
import org.distorted.scores.RubikScoresDownloader; |
35 | 36 |
import org.distorted.object.RubikObjectList; |
36 | 37 |
import org.distorted.uistate.RubikState; |
... | ... | |
41 | 42 |
|
42 | 43 |
public class RubikActivity extends AppCompatActivity implements View.OnClickListener |
43 | 44 |
{ |
45 |
private boolean mJustStarted; |
|
46 |
|
|
47 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
48 |
|
|
44 | 49 |
@Override |
45 | 50 |
protected void onCreate(Bundle savedState) |
46 | 51 |
{ |
47 | 52 |
super.onCreate(savedState); |
48 | 53 |
setTheme(R.style.CustomActivityThemeNoActionBar); |
49 | 54 |
setContentView(R.layout.main); |
55 |
|
|
56 |
mJustStarted = true; |
|
50 | 57 |
} |
51 | 58 |
|
52 | 59 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
74 | 81 |
RubikState.setState(this); |
75 | 82 |
RubikStatePlay play = (RubikStatePlay)RubikState.PLAY.getStateClass(); |
76 | 83 |
|
84 |
if( mJustStarted ) |
|
85 |
{ |
|
86 |
mJustStarted = false; |
|
87 |
RubikScores.getInstance().incrementNumRuns(); |
|
88 |
} |
|
89 |
|
|
77 | 90 |
int object = play.getObject(); |
78 | 91 |
int size = play.getSize(); |
79 | 92 |
RubikObjectList obj = RubikObjectList.getObject(object); |
Also available in: Unified diff
Progress with saving number of runs, plays, name, verified status.