mirror of
https://github.com/godotengine/godot.git
synced 2025-10-21 08:53:35 +00:00
Little Bits
-=-=-=-=-=- -Fixed small bugs all around -Added ability to show/hide entire sections of the spatial (3D) tree -WIP new vehicle (not ready yet) based on Bullet
This commit is contained in:
parent
c3e1d7b7c7
commit
2ee4ac183b
56 changed files with 3943 additions and 1757 deletions
|
@ -349,12 +349,12 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
|||
io.unique_id = Secure.getString(getContentResolver(), Secure.ANDROID_ID);
|
||||
GodotLib.io=io;
|
||||
Log.d("GODOT", "command_line is null? " + ((command_line == null)?"yes":"no"));
|
||||
if(command_line != null){
|
||||
/*if(command_line != null){
|
||||
Log.d("GODOT", "Command Line:");
|
||||
for(int w=0;w <command_line.length;w++){
|
||||
Log.d("GODOT"," " + command_line[w]);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
GodotLib.initialize(this,io.needsReloadHooks(),command_line);
|
||||
mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
|
||||
mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
|
||||
|
@ -418,12 +418,10 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
|||
}
|
||||
|
||||
if (new_args.isEmpty()){
|
||||
Log.d("GODOT", "new_args is empty");
|
||||
command_line=null;
|
||||
}else{
|
||||
Log.d("GODOT", "new_args is not empty");
|
||||
|
||||
command_line = new_args.toArray(new String[new_args.size()]);
|
||||
Log.d("GODOT", "command line is null? " + ( (command_line == null) ? "yes":"no"));
|
||||
}
|
||||
if (use_apk_expansion && main_pack_md5!=null && main_pack_key!=null) {
|
||||
//check that environment is ok!
|
||||
|
@ -461,7 +459,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
|||
}
|
||||
|
||||
if (!pack_valid) {
|
||||
Log.d("GODOT", "Tengo que bajarme el apk");
|
||||
Log.d("GODOT", "Pack Invalid, try re-downloading.");
|
||||
|
||||
Intent notifierIntent = new Intent(this, this.getClass());
|
||||
notifierIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
|
||||
|
@ -472,7 +470,7 @@ public class Godot extends Activity implements SensorEventListener, IDownloaderC
|
|||
|
||||
int startResult;
|
||||
try {
|
||||
Log.d("GODOT", "INICIANDO DOWNLOAD SERVICE");
|
||||
Log.d("GODOT", "INITIALIZING DOWNLOAD");
|
||||
startResult = DownloaderClientMarshaller.startDownloadServiceIfRequired(
|
||||
getApplicationContext(),
|
||||
pendingIntent,
|
||||
|
|
|
@ -32,9 +32,9 @@ abstract public class GenericConsumeTask extends AsyncTask<String, String, Strin
|
|||
@Override
|
||||
protected String doInBackground(String... params) {
|
||||
try {
|
||||
Log.d("godot", "Requesting to consume an item with token ." + token);
|
||||
// Log.d("godot", "Requesting to consume an item with token ." + token);
|
||||
int response = mService.consumePurchase(3, context.getPackageName(), token);
|
||||
Log.d("godot", "consumePurchase response: " + response);
|
||||
// Log.d("godot", "consumePurchase response: " + response);
|
||||
if(response == 0 || response == 8){
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -28,19 +28,19 @@ abstract public class HandlePurchaseTask {
|
|||
|
||||
|
||||
public void handlePurchaseRequest(int resultCode, Intent data){
|
||||
Log.d("XXX", "Handling purchase response");
|
||||
// Log.d("XXX", "Handling purchase response");
|
||||
// int responseCode = data.getIntExtra("RESPONSE_CODE", 0);
|
||||
PaymentsCache pc = new PaymentsCache(context);
|
||||
|
||||
String purchaseData = data.getStringExtra("INAPP_PURCHASE_DATA");
|
||||
Log.d("XXX", "Purchase data:" + purchaseData);
|
||||
// Log.d("XXX", "Purchase data:" + purchaseData);
|
||||
String dataSignature = data.getStringExtra("INAPP_DATA_SIGNATURE");
|
||||
Log.d("XXX", "Purchase signature:" + dataSignature);
|
||||
//Log.d("XXX", "Purchase signature:" + dataSignature);
|
||||
|
||||
if (resultCode == Activity.RESULT_OK) {
|
||||
|
||||
try {
|
||||
Log.d("SARLANGA", purchaseData);
|
||||
// Log.d("SARLANGA", purchaseData);
|
||||
|
||||
|
||||
JSONObject jo = new JSONObject(purchaseData);
|
||||
|
@ -58,7 +58,7 @@ abstract public class HandlePurchaseTask {
|
|||
error("Untrusted callback");
|
||||
return;
|
||||
}
|
||||
Log.d("XXX", "Este es el product ID:" + productId);
|
||||
// Log.d("XXX", "Este es el product ID:" + productId);
|
||||
pc.setConsumableValue("ticket_signautre", productId, dataSignature);
|
||||
pc.setConsumableValue("ticket", productId, purchaseData);
|
||||
pc.setConsumableFlag("block", productId, true);
|
||||
|
|
|
@ -31,14 +31,14 @@ public class PaymentsCache {
|
|||
SharedPreferences sharedPref = context.getSharedPreferences("consumables_" + set, Context.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = sharedPref.edit();
|
||||
editor.putString(sku, value);
|
||||
Log.d("XXX", "Setting asset: consumables_" + set + ":" + sku);
|
||||
// Log.d("XXX", "Setting asset: consumables_" + set + ":" + sku);
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
public String getConsumableValue(String set, String sku){
|
||||
SharedPreferences sharedPref = context.getSharedPreferences(
|
||||
"consumables_" + set, Context.MODE_PRIVATE);
|
||||
Log.d("XXX", "Getting asset: consumables_" + set + ":" + sku);
|
||||
// Log.d("XXX", "Getting asset: consumables_" + set + ":" + sku);
|
||||
return sharedPref.getString(sku, null);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,13 +28,13 @@ abstract public class ReleaseAllConsumablesTask {
|
|||
|
||||
public void consumeItAll(){
|
||||
try{
|
||||
Log.d("godot", "consumeItall for " + context.getPackageName());
|
||||
// Log.d("godot", "consumeItall for " + context.getPackageName());
|
||||
Bundle bundle = mService.getPurchases(3, context.getPackageName(), "inapp",null);
|
||||
|
||||
for (String key : bundle.keySet()) {
|
||||
Object value = bundle.get(key);
|
||||
Log.d("godot", String.format("%s %s (%s)", key,
|
||||
value.toString(), value.getClass().getName()));
|
||||
// Log.d("godot", String.format("%s %s (%s)", key,
|
||||
// value.toString(), value.getClass().getName()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -45,13 +45,13 @@ abstract public class ReleaseAllConsumablesTask {
|
|||
|
||||
|
||||
if (myPurchases == null || myPurchases.size() == 0){
|
||||
Log.d("godot", "No purchases!");
|
||||
// Log.d("godot", "No purchases!");
|
||||
notRequired();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Log.d("godot", "# products to be consumed:" + myPurchases.size());
|
||||
// Log.d("godot", "# products to be consumed:" + myPurchases.size());
|
||||
for (int i=0;i<myPurchases.size();i++)
|
||||
{
|
||||
|
||||
|
@ -61,7 +61,7 @@ abstract public class ReleaseAllConsumablesTask {
|
|||
String sku = inappPurchaseData.getString("productId");
|
||||
String token = inappPurchaseData.getString("purchaseToken");
|
||||
String signature = mySignatures.get(i);
|
||||
Log.d("godot", "A punto de consumir un item con token:" + token + "\n" + receipt);
|
||||
// Log.d("godot", "A punto de consumir un item con token:" + token + "\n" + receipt);
|
||||
new GenericConsumeTask(context, mService, sku, receipt,signature, token) {
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue