21 |
21 |
import org.distorted.objectlib.main.ObjectSignatures;
|
22 |
22 |
import org.distorted.objectlib.main.ObjectType;
|
23 |
23 |
|
24 |
|
import static org.distorted.main.RubikActivity.SHOW_SOLVED_DEBUG;
|
|
24 |
import static org.distorted.main.RubikActivity.SHOW_IAP_DEBUG;
|
25 |
25 |
import static org.distorted.objectlib.main.TwistyObject.MESH_NICE;
|
26 |
26 |
import static org.distorted.objectlib.main.ObjectType.NUM_OBJECTS;
|
27 |
27 |
import static org.distorted.main.RubikActivity.SHOW_DOWNLOADED_DEBUG;
|
... | ... | |
140 |
140 |
{
|
141 |
141 |
mBoughtObjects = preferences.getString("rol_bought", "");
|
142 |
142 |
|
143 |
|
if( SHOW_SOLVED_DEBUG )
|
|
143 |
if( SHOW_IAP_DEBUG )
|
144 |
144 |
{
|
145 |
145 |
android.util.Log.e("D", "bought objects: "+mBoughtObjects);
|
146 |
146 |
}
|
... | ... | |
290 |
290 |
public static void buyAll()
|
291 |
291 |
{
|
292 |
292 |
mBoughtObjects = "*";
|
293 |
|
if( SHOW_SOLVED_DEBUG ) android.util.Log.e("D", "all objects marked as bought");
|
|
293 |
if( SHOW_IAP_DEBUG ) android.util.Log.e("D", "all objects marked as bought");
|
294 |
294 |
|
295 |
295 |
for(int i=0; i<mNumObjects; i++)
|
296 |
296 |
{
|
... | ... | |
307 |
307 |
if( object!=null && !object.isFree() )
|
308 |
308 |
{
|
309 |
309 |
String shortName = object.getUpperName();
|
310 |
|
if( SHOW_SOLVED_DEBUG ) android.util.Log.e("D", "object "+shortName+" marked as bought");
|
|
310 |
if( SHOW_IAP_DEBUG ) android.util.Log.e("D", "object "+shortName+" marked as bought");
|
311 |
311 |
object.markFree();
|
312 |
312 |
String add = mBoughtObjects.length()==0 ? shortName : (","+shortName);
|
313 |
313 |
mBoughtObjects += add;
|
... | ... | |
362 |
362 |
{
|
363 |
363 |
editor.putString("rol_bought", mBoughtObjects);
|
364 |
364 |
|
365 |
|
if( SHOW_SOLVED_DEBUG )
|
|
365 |
if( SHOW_IAP_DEBUG )
|
366 |
366 |
{
|
367 |
367 |
android.util.Log.e("D", "saving bought objects: "+mBoughtObjects);
|
368 |
368 |
}
|
... | ... | |
476 |
476 |
|
477 |
477 |
if( object!=null && !object.isFree() && scores.isSolved(obj,LEVELS_SHOWN) )
|
478 |
478 |
{
|
479 |
|
if( SHOW_SOLVED_DEBUG ) android.util.Log.e("D", "object "+object.getUpperName()+" marked as free");
|
|
479 |
if( SHOW_IAP_DEBUG ) android.util.Log.e("D", "object "+object.getUpperName()+" marked as free");
|
480 |
480 |
object.markFree();
|
481 |
481 |
int price = object.getPrice();
|
482 |
482 |
scores.changeNumStars(-price);
|
... | ... | |
499 |
499 |
|
500 |
500 |
if( object!=null && !object.isFree() )
|
501 |
501 |
{
|
502 |
|
if( SHOW_SOLVED_DEBUG ) android.util.Log.e("D", "object "+object.getUpperName()+" marked as free");
|
|
502 |
if( SHOW_IAP_DEBUG ) android.util.Log.e("D", "object "+object.getUpperName()+" marked as free");
|
503 |
503 |
object.markFree();
|
504 |
504 |
int price = object.getPrice();
|
505 |
505 |
scores.changeNumStars(-price);
|
Minor