Revision d7f0c07d
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/external/RubikScores.java | ||
---|---|---|
45 | 45 |
private int mNumPlays; |
46 | 46 |
private int mNumWins; |
47 | 47 |
private int mDeviceID; |
48 |
private int mNumStars; |
|
48 | 49 |
|
49 | 50 |
private static class MapValue |
50 | 51 |
{ |
... | ... | |
75 | 76 |
mNumRuns = -1; |
76 | 77 |
mDeviceID= -1; |
77 | 78 |
mNumWins = 0; |
79 |
mNumStars= 0; |
|
78 | 80 |
} |
79 | 81 |
|
80 | 82 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
233 | 235 |
return mNumWins; |
234 | 236 |
} |
235 | 237 |
|
238 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
239 |
|
|
240 |
public void changeNumStars(int stars) |
|
241 |
{ |
|
242 |
mNumStars += stars; |
|
243 |
} |
|
244 |
|
|
245 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
246 |
|
|
247 |
public int getNumStars() |
|
248 |
{ |
|
249 |
return mNumStars; |
|
250 |
} |
|
251 |
|
|
236 | 252 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
237 | 253 |
|
238 | 254 |
public void setName(String newName) |
... | ... | |
360 | 376 |
editor.putInt("scores_numPlays", mNumPlays); |
361 | 377 |
editor.putInt("scores_numRuns" , mNumRuns ); |
362 | 378 |
editor.putInt("scores_deviceid", mDeviceID); |
363 |
editor.putInt("scores_review" , mNumWins ); |
|
379 |
editor.putInt("scores_review" , mNumWins ); // legacy name |
|
380 |
editor.putInt("scores_numStars", mNumStars ); |
|
364 | 381 |
} |
365 | 382 |
|
366 | 383 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
431 | 448 |
mNumRuns = preferences.getInt("scores_numRuns" , 0); |
432 | 449 |
mDeviceID = preferences.getInt("scores_deviceid",-1); |
433 | 450 |
mNumWins = preferences.getInt("scores_review" , 0); |
451 |
mNumStars = preferences.getInt("scores_numStars", 0); |
|
434 | 452 |
|
435 | 453 |
if( mDeviceID==-1 ) mDeviceID = privateGetDeviceID(); |
436 | 454 |
|
Also available in: Unified diff
Beginnings of support for 'Overlays': first overlay will be the rotating star which little stars fly to when one solves a level for the first time.