public bool IsDeviceRegisterNeeded() { GamedoniaPushNotifications pushScript = this.GetComponent <GamedoniaPushNotifications>(); GamedoniaStoreInAppPurchases inappScript = this.GetComponent <GamedoniaStoreInAppPurchases>(); return(pushScript != null || inappScript != null); }
// Use this for initialization void Start() { // In App purchases, request callback GDInAppService reqService = new GDInAppService(); reqService.RegisterEvent += new InAppEventHandler(OnProductsRequested); GamedoniaStoreInAppPurchases.AddRequestService(reqService); // In App purchases, buyservice callback GDInAppService buyService = new GDInAppService(); buyService.RegisterEvent += new InAppEventHandler(OnProductPurchased); GamedoniaStoreInAppPurchases.AddPurchaseService(buyService); }
void Start() { GamedoniaUsers.Authenticate(OnLogin); printToConsole("Starting session with Gamedonia..."); //Register the callback GDInAppService reqService = new GDInAppService(); reqService.RegisterEvent += new InAppEventHandler(OnProductsRequested); GamedoniaStoreInAppPurchases.AddRequestService(reqService); GDInAppService buyService = new GDInAppService(); buyService.RegisterEvent += new InAppEventHandler(OnProductPurchased); GamedoniaStoreInAppPurchases.AddPurchaseService(buyService); }