Revision 0c233a9a
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/screens/RubikScreenSolving.java | ||
---|---|---|
167 | 167 |
|
168 | 168 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
169 | 169 |
|
170 |
public long getRecord()
|
|
170 |
public long stopTimerAndGetRecord()
|
|
171 | 171 |
{ |
172 | 172 |
if( mRunning ) |
173 | 173 |
{ |
174 | 174 |
stopCounting(); |
175 |
|
|
176 | 175 |
mElapsed = System.currentTimeMillis()-mStartTime; |
177 |
|
|
178 |
RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getScreenClass(); |
|
179 |
int object = RubikObjectList.getCurrObject(); |
|
180 |
int level = play.getLevel()-1; |
|
181 |
boolean isNew = mScores.setRecord(object, level, mElapsed); |
|
182 |
|
|
183 |
return isNew ? mElapsed : -mElapsed; |
|
176 |
return mElapsed; |
|
184 | 177 |
} |
185 | 178 |
|
186 | 179 |
return 0; |
187 | 180 |
} |
188 | 181 |
|
182 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
183 |
|
|
184 |
public int setRecord() |
|
185 |
{ |
|
186 |
RubikScreenPlay play = (RubikScreenPlay) ScreenList.PLAY.getScreenClass(); |
|
187 |
int object = RubikObjectList.getCurrObject(); |
|
188 |
int level = play.getLevel()-1; |
|
189 |
return mScores.setRecord(object, level, mElapsed); |
|
190 |
} |
|
191 |
|
|
189 | 192 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
190 | 193 |
|
191 | 194 |
public void resetElapsed() |
Also available in: Unified diff
Partly merge the 'iap' branch.