Example #1
0
        public static bool IsProductReceiptValid(Product product)
        {
            if (product == null)
            {
                return(false);
            }

#if UNITY_ANDROID || UNITY_IOS || UNITY_STANDALONE_OSX
            var validator = new CrossPlatformValidator(GooglePlayTangle.Data(), AppleTangle.Data(), Application.identifier);
            try {
                var result = validator.Validate(product.receipt);
                UDBG.Log("Receipt is valid. Contents:");
                foreach (IPurchaseReceipt productReceipt in result)
                {
                    UDBG.Log(productReceipt.productID);
                    UDBG.Log(productReceipt.purchaseDate);
                    UDBG.Log(productReceipt.transactionID);
                }
            } catch (IAPSecurityException exception) {
                UDBG.Log("Invalid receipt not unlcokded content".Attrib(bold: true, italic: true, color: "r"));
                return(false);
            }
#endif
            return(true);
        }
Example #2
0
 public void Setup(Vector2[] positions, float interval, float offset)
 {
     if (positions.Length < 4)
     {
         UDBG.LogError($"EndGaimCoin: count of positions muste be >= 4");
     }
     this.startPosition = positions[0];
     this.cp1           = positions[1];
     this.cp2           = positions[2];
     this.endPosition   = positions[3];
     this.interval      = interval;
     this.offset        = offset;
     Setup();
 }
Example #3
0
 public void UpdateResume(bool pause)
 => UDBG.Log($"{nameof(GameModeService)}.{nameof(UpdateResume)}() => {pause}");
Example #4
0
 public override void Load(TutorialStateSave save)
 {
     base.Load(save);
     UDBG.Log($"{nameof(ShowTransferAndPersonalPurchasesState)} loaded");
 }