Revision 43382be6
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/objects/RubikObjectList.java | ||
---|---|---|
476 | 476 |
|
477 | 477 |
if( object!=null && !object.isFree() && scores.isSolved(obj,LEVELS_SHOWN) ) |
478 | 478 |
{ |
479 |
if( SHOW_IAP_DEBUG ) android.util.Log.e("D", "object "+object.getUpperName()+" marked as free"); |
|
480 |
object.markFree(); |
|
481 |
int price = object.getPrice(); |
|
482 |
scores.changeNumStars(-price); |
|
479 |
markAsFree(object,scores); |
|
483 | 480 |
ret++; |
484 | 481 |
} |
485 | 482 |
} |
... | ... | |
499 | 496 |
|
500 | 497 |
if( object!=null && !object.isFree() ) |
501 | 498 |
{ |
502 |
if( SHOW_IAP_DEBUG ) android.util.Log.e("D", "object "+object.getUpperName()+" marked as free"); |
|
503 |
object.markFree(); |
|
504 |
int price = object.getPrice(); |
|
505 |
scores.changeNumStars(-price); |
|
499 |
markAsFree(object,scores); |
|
506 | 500 |
numToBeMarked--; |
507 | 501 |
} |
508 | 502 |
} |
509 | 503 |
} |
510 | 504 |
|
505 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
506 |
|
|
507 |
private static void markAsFree(RubikObject object, RubikScores scores) |
|
508 |
{ |
|
509 |
if( SHOW_IAP_DEBUG ) android.util.Log.e("D", "object "+object.getUpperName()+" marked as free"); |
|
510 |
object.markFree(); |
|
511 |
int price = object.getPrice(); |
|
512 |
scores.changeNumStars(-price); |
|
513 |
} |
|
514 |
|
|
511 | 515 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
512 | 516 |
|
513 | 517 |
public static boolean setCurrObject(int ordinal) |
Also available in: Unified diff
Fix marking objects as free.