void Start() { StoreEvents.OnMarketPurchase += onMarketPurchase; StoreEvents.OnMarketRefund += onMarketRefund; StoreEvents.OnItemPurchased += onItemPurchased; StoreEvents.OnGoodEquipped += onGoodEquipped; StoreEvents.OnGoodUnEquipped += onGoodUnequipped; StoreEvents.OnGoodUpgrade += onGoodUpgrade; StoreEvents.OnBillingSupported += onBillingSupported; StoreEvents.OnBillingNotSupported += onBillingNotSupported; StoreEvents.OnMarketPurchaseStarted += onMarketPurchaseStarted; StoreEvents.OnItemPurchaseStarted += onItemPurchaseStarted; StoreEvents.OnUnexpectedErrorInStore += onUnexpectedErrorInStore; StoreEvents.OnCurrencyBalanceChanged += onCurrencyBalanceChanged; StoreEvents.OnGoodBalanceChanged += onGoodBalanceChanged; StoreEvents.OnMarketPurchaseCancelled += onMarketPurchaseCancelled; StoreEvents.OnRestoreTransactionsStarted += onRestoreTransactionsStarted; StoreEvents.OnRestoreTransactionsFinished += onRestoreTransactionsFinished; #if UNITY_ANDROID && !UNITY_EDITOR StoreEvents.OnIabServiceStarted += onIabServiceStarted; StoreEvents.OnIabServiceStopped += onIabServiceStopped; #endif SoomlaStore.Initialize(new GameAssets()); }
//Soomla ------------------------------------------------------------------------------------------------------ /// Inicializa os Eventos do Soomla e Inicializa o SoomlaStore private void StartStoreEvents() { StoreEvents.OnSoomlaStoreInitialized += OnSoomlaStoreInitialized; StoreEvents.OnItemPurchased += OnItemPurchased; StoreEvents.OnCurrencyBalanceChanged += onCurrencyBalanceChanged; StoreEvents.OnMarketPurchase += onMarketPurchase; StoreEvents.OnMarketPurchaseCancelled += onMarketPurchaseCancelled; //Callbacks para teste StoreEvents.OnMarketPurchaseStarted += onMarketPurchaseStarted; StoreEvents.OnGoodBalanceChanged += onGoodBalanceChanged; StoreEvents.OnMarketRefund += onMarketRefund; StoreEvents.OnMarketItemsRefreshStarted += onMarketItemsRefreshStarted; StoreEvents.OnMarketItemsRefreshFinished += onMarketItemsRefreshFinished; StoreEvents.OnRestoreTransactionsStarted += onRestoreTransactionsStarted; StoreEvents.OnRestoreTransactionsFinished += onRestoreTransactionsFinished; StoreEvents.OnItemPurchaseStarted += onItemPurchaseStarted; StoreEvents.OnGoodEquipped += onGoodEquipped; StoreEvents.OnGoodUnEquipped += onGoodUnequipped; StoreEvents.OnGoodUpgrade += onGoodUpgrade; StoreEvents.OnBillingSupported += onBillingSupported; StoreEvents.OnBillingNotSupported += onBillingNotSupported; if (!SoomlaStore.Initialized) { SoomlaStore.Initialize(new PowliticosStoreAssets(controller.AllVirtualGoods(), controller.powliticos.Length)); } else { OnSoomlaStoreInitialized(); } }
void Initialize() { DontDestroyOnLoad(gameObject); Application.targetFrameRate = targetFrameRate; RestartSessionMetrics(); // soomla store stuff StoreEvents.OnItemPurchased += onItemPurchased; StoreEvents.OnRestoreTransactionsFinished += onRestoreTransactionsFinished; if (!SoomlaStore.Initialized) { SoomlaStore.Initialize(new SoomlaStoreAssets()); } gameDataBlob = new GameDataBlob(); gameDataBlob.Init(saveDataFormatVersion); // create generic game service class #if UNITY_IOS gameService = new AppleGameCenterAPI(); gameService.Initialize(); #endif #if UNITY_ANDROID gameService = new GooglePlayAPI(); #endif #if UNITY_EDITOR gameService = new GameServiceMock(); #endif gameService.Initialize(); // callback is managed in gameService API pendingCloudSaveOperation = 1; }
void Start() { SoomlaStore.Initialize(new NinjevadeAssets()); StoreEvents.OnMarketPurchaseStarted += onMarketPurchaseStarted; StoreEvents.OnMarketPurchaseCancelled += onMarketPurchaseCancelled; StoreEvents.OnMarketPurchase += onMarketPurchase; }
/// <summary> /// Starts this instance. /// Use this for initialization. /// </summary> void Start() { handler = new ExampleEventHandler(); SoomlaStore.Initialize(new MuffinRushAssets()); SoomlaProfile.Initialize(); //levelup World mainWorld = WorldGenerator.GenerateCustomWorld(); SoomlaLevelUp.Initialize(mainWorld); // WorldGenerator.Play (mainWorld); tImgDirect = (Texture2D)Resources.Load("SoomlaStore/images/img_direct"); fgoodDog = (Font)Resources.Load("SoomlaStore/GoodDog" + fontSuffix); fgoodDogSmall = (Font)Resources.Load("SoomlaStore/GoodDog_small" + fontSuffix); tLogoNew = (Texture2D)Resources.Load("SoomlaStore/images/soomla_logo_new"); tWhitePixel = (Texture2D)Resources.Load("SoomlaStore/images/white_pixel"); fTitle = (Font)Resources.Load("SoomlaStore/Title" + fontSuffix); tMuffins = (Texture2D)Resources.Load("SoomlaStore/images/Muffins"); fName = (Font)Resources.Load("SoomlaStore/Name" + fontSuffix); fDesc = (Font)Resources.Load("SoomlaStore/Description" + fontSuffix); fBuy = (Font)Resources.Load("SoomlaStore/Buy" + fontSuffix); tBack = (Texture2D)Resources.Load("SoomlaStore/images/back"); tGetMore = (Texture2D)Resources.Load("SoomlaStore/images/GetMore"); tTitle = (Font)Resources.Load("SoomlaStore/Title" + fontSuffix); }
void Start() { // Register callbacks for Grow Insights before initialization HighwayEvents.OnInsightsRefreshFinished += OnInsightsRefreshFinished; // Register callbacks for SOOMLA LevelUp before initialization LevelUpEvents.OnLevelEnded += OnLevelEnded; // Register callbacks for Chartboost events SetChartboostEvents(); Chartboost.cacheInterstitial(CBLocation.LevelComplete); Chartboost.cacheRewardedVideo(CBLocation.LevelComplete); // Make sure to make this call in your earliest loading scene, // and before initializing any other SOOMLA/GROW components // i.e. before SoomlaStore.Initialize(...) GrowHighway.Initialize(); GrowInsights.Initialize(); // Initialize SOOMLA Store & LevelUp // Assumes you've implemented your store assets // and an initial world with levels and missions SoomlaStore.Initialize(new YourStoreAssetsImplementation()); SoomlaLevelUp.Initialize(WORLD); }
public void Initialize() { _handler = new CharsooStoreEventHandler(); CharsooStoreAsset storeAsset = new CharsooStoreAsset(); SoomlaStore.Initialize(storeAsset); }
// Use this for initialization void Start() { SoomlaStore.Initialize(new MashinRunAssets()); StoreEvents.OnMarketPurchaseCancelled += Failed; StoreEvents.OnMarketPurchase += OnMarketPurchase; StoreEvents.OnItemPurchased += Purchased; StoreEvents.OnMarketPurchaseCancelled += Canceled; }
public void Awake() { Instance = this; if (Application.loadedLevelName == "map") { if (GameObject.Find("Canvas").transform.Find("MenuPlay").gameObject.activeSelf) { GameObject.Find("Canvas").transform.Find("MenuPlay").gameObject.SetActive(false); } } RestLifeTimer = PlayerPrefs.GetFloat("RestLifeTimer"); // if(InitScript.DateOfExit == "") // print(InitScript.DateOfExit ); DateOfExit = PlayerPrefs.GetString("DateOfExit", ""); Gems = PlayerPrefs.GetInt("Gems"); Lifes = PlayerPrefs.GetInt("Lifes"); if (PlayerPrefs.GetInt("Lauched") == 0) { //First lauching FirstTime = true; Lifes = CapOfLife; Gems = 5; PlayerPrefs.SetInt("Gems", Gems); PlayerPrefs.SetInt("Lifes", Lifes); PlayerPrefs.SetInt("Lauched", 1); PlayerPrefs.SetInt("Music", 1); PlayerPrefs.SetInt("Sound", 1); PlayerPrefs.Save(); } GameObject.Find("Music").GetComponent <AudioSource>().volume = PlayerPrefs.GetInt("Music"); SoundBase.Instance.GetComponent <AudioSource>().volume = PlayerPrefs.GetInt("Sound"); ReloadBoosts(); boostPurchased = false; if (GameObject.Find("CoreEvents") == null) { GameObject core = Instantiate(Resources.Load("Soomla/CoreEvents")) as GameObject; core.name = "CoreEvents"; Instantiate(Resources.Load("Soomla/StoreEvents")); } //StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreInitialized; //StoreEvents.OnCurrencyBalanceChanged += onCurrencyBalanceChanged; StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreInitialized; StoreEvents.OnMarketPurchase += onMarketPurchase; try { SoomlaStore.Initialize(new SoomlaIntegration()); } catch (Exception) { // throw; } }
// Use this for initialization void Start() { // Initialize SOOMLA Store SoomlaStore.Initialize(new SoomlaAssets()); // Request banner and interstitial form Admob requestNewBanner(); requestNewInterstitial(); }
void Start() { SoomlaStore.Initialize(this); StoreEvents.OnCurrencyBalanceChanged += onCurrencyBalanceChanged; StoreEvents.OnItemPurchased += onItemPurchased; StoreEvents.OnGoodBalanceChanged += onGoodBalanceChanged; StoreEvents.OnMarketPurchase += onMarketPurchase; StoreEvents.OnNotEnoughTargetItem += onNotEnoughTargetItem; }
// Use this for initialization void Start() { btn = GetComponent <Button>(); // Initialize AdColony & SOOMLA Store InitializeAdColony(); StoreEvents.OnCurrencyBalanceChanged += onCurrencyBalanceChanged; SoomlaStore.Initialize(new YourStoreAssetsImplementation()); }
private void Start() { // Register SOOMLA Store event handlers StoreEvents.OnMarketPurchase += MyBehaviour.OnMarketPurchase; // Initialize SOOMLA Store // Assumes you've implemented your store assets SoomlaStore.Initialize(new YourStoreAssetsImplementation()); }
public cIAP(string xml_filename) { ourIAPAssets = new IAP_Assets(); parser = new cIAP_Parser(); StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreInitialized; loadIAPData(xml_filename); //inicializar soomla SoomlaStore.Initialize(ourIAPAssets); }
// Use this for initialization void Start () { StoreEvents.OnUnexpectedErrorInStore += onUnexpectedErrorInStore; SoomlaStore.Initialize(new IABItems()); if (GameDataManager.ManangerInstance.IsFirstPlay) GiveItem(); }
public override void Load() { if (Assets == null) { Logs.Instance.ProcessError("Trying to initialize store without store assets"); return; } SoomlaStore.Initialize(Assets); }
void Start() { // Application.LoadLevel ("test"); //Load actual scene/ // DontDestroyOnLoad(transform.gameObject); //Allows this gameObject to remain during level loads, solving restart crashes StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreIntitialized; SoomlaStore.Initialize(new StoreAssets()); //StoreEvents.OnItemPurchased += onItemPurchased; StoreEvents.OnMarketPurchase += onMarketPurchase; }
void Start() { SoomlaStore.Initialize(new BerryStoreAssets()); StoreEvents.OnCurrencyBalanceChanged += onCurrencyBalanceChanged; StoreEvents.OnItemPurchased += onItemPurchased; StoreEvents.OnGoodBalanceChanged += onGoodBalanceChanged; StoreEvents.OnMarketPurchase += onMarketPurchase; StoreEvents.OnNotEnoughTargetItem += onNotEnoughTargetItem; StoreEvents.OnMarketItemsRefreshFinished += onMarketItemsRefreshFinished; }
void Start() { PlayerPrefs.GetInt("HasNoAdsBeenBought", 0); PlayerPrefs.Save(); DontDestroyOnLoad(transform.gameObject); //Allows this gameObject to remain during level loads, solving restart crashes StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreIntitialized; //Handle the initialization of store events (calls function below - unneeded in this case) SoomlaStore.Initialize(new PurchaseCharacters()); //Intialize the store }
// Use this for initialization void Start() { fetchConfig(); GameData.Instance.versionCode = int.Parse(versionCode.text.Trim()); GameData.Instance.playerId = 1; StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreInitialized; SoomlaStore.Initialize(new NumberGameAssets()); Thread.Sleep(500); Application.LoadLevel("MainMenu"); }
void Start() { if (this.gameObject.name == "Initializer") { SoomlaStore.Initialize(new AppAssets()); StoreEvents.OnItemPurchased += ShopScript.onItemPurchased; } else if (this.gameObject.name != "Initializer") { DontDestroyOnLoad(this.gameObject); } }
// Use this for initialization void Start() { hasDisplayed = false; roundScore.text = "Score " + Score.currentScore.ToString(); highScore.text = "High Score: " + PlayerPrefs.GetInt("highScore").ToString(); //Chartboost.Create (); Chartboost.setAutoCacheAds(true); if (!SoomlaStore.Initialized) { SoomlaStore.Initialize(new Soomla.Store.GalaxyDefender.GalaxyDefenderAssets()); SoomlaStore.RefreshInventory(); } ItemBalance = StoreInventory.GetItemBalance("no_ads"); if (ItemBalance > 0) { showAd = false; } else { showAd = true; } if (Score.currentScore >= 10000) { Social.ReportProgress("CgkIl_fbqZ4MEAIQAQ", 100.0f, (bool success) => { }); } if (Score.currentScore >= 100000) { Social.ReportProgress("CgkIl_fbqZ4MEAIQAg", 100.0f, (bool success) => { }); } if (Score.currentScore >= 250000) { Social.ReportProgress("CgkIl_fbqZ4MEAIQAw", 100.0f, (bool success) => { }); } if (Score.currentScore >= 500000) { Social.ReportProgress("CgkIl_fbqZ4MEAIQBA", 100.0f, (bool success) => { }); } if (Score.currentScore >= 1000000) { Social.ReportProgress("CgkIl_fbqZ4MEAIQBQ", 100.0f, (bool success) => { }); } if (Score.currentScore >= 5000000) { Social.ReportProgress("CgkIl_fbqZ4MEAIQBw", 100.0f, (bool success) => { }); } Social.ReportScore(Score.currentScore, "CgkIl_fbqZ4MEAIQBg", (bool success) => { }); }
IEnumerator Start() { // Bind Event StoreEvents.OnSoomlaStoreInitialized += OnSoomlaStoreInitialized; StoreEvents.OnMarketPurchase += OnMarketPurchase; StoreEvents.OnMarketPurchaseCancelled += OnMarketPurchaseCancelled; if (SoomlaStore.Initialized == false) { // Store Initialize yield return(SoomlaStore.Initialize(new PremiumVersionAsset())); } }
//Load the Scene with the cube/ setup the soomla intergration void Start() { if (!mInstance) { mInstance = this; } Application.LoadLevel("MainMenu"); //Load actual scene DontDestroyOnLoad(transform.gameObject); //Allows this gameObject to remain during level loads, solving restart crashes StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreIntitialized; //Handle the initialization of store events (calls function below - unneeded in this case) StoreEvents.OnMarketPurchase += onMarketPurchase; SoomlaStore.Initialize(new StoreAssets()); //Intialize the store }
// Use this for initialization void Start() { audioIsOff = PlayerPrefs.GetInt("audioisoff"); if (audioIsOff == 0) { // set audio ON soundButtonOFF.SetActive(false); soundButtonON.SetActive(true); } else { // set audio ON soundButtonOFF.SetActive(true); soundButtonON.SetActive(false); } PlayerPrefs.SetString("leaderboardid", LEADERBOARD_ID); PlayerPrefs.SetString("twittertext", TWITTER_MESSAGE); PlayerPrefs.SetString("admobbannerid", ADMOB_BANNER_ID); PlayerPrefs.SetString("INAPP_PURCHASE_REMOVE_ADS", INAPP_PURCHASE_REMOVE_ADS); Social.localUser.Authenticate(ProcessAuthentication); PlayBackgroundMusic(); Chartboost.didFailToLoadMoreApps += didFailToLoadMoreApps; Chartboost.didDismissMoreApps += didDismissMoreApps; Chartboost.didCloseMoreApps += didCloseMoreApps; Chartboost.didClickMoreApps += didClickMoreApps; Chartboost.didCacheMoreApps += didCacheMoreApps; Chartboost.shouldDisplayMoreApps += shouldDisplayMoreApps; Chartboost.didDisplayMoreApps += didDisplayMoreApps; Chartboost.cacheMoreApps(CBLocation.HomeScreen); AdsRemoved = PlayerPrefs.GetInt("adsremoved") == 1; if (AdsRemoved) { HideAdsButton(); } else { RequestBanner(); } StoreEvents.OnMarketItemsRefreshFailed += storeRefreshFailed; StoreEvents.OnMarketPurchase += onMarketPurchase; StoreEvents.OnItemPurchased += onItemPurchased; StoreEvents.OnRestoreTransactionsFinished += onRestoreTransactionsFinished; SoomlaStore.Initialize(new GameAssets()); }
// Use this for initialization void Start() { //image_anim = image_ref.GetComponent<Animator>(); //fadeColorAnimationClip = image_ref.GetComponent<Animation>(); //fadeColorAnimationClip.Play ("FadeToColor"); // Initialize the store assets SoomlaStore.Initialize(new SOAPStoreAssets()); // Initialize soomla profile SoomlaProfile.Initialize(); Invoke("LoadDelayed", 1.0f); }
// Use this for initialization void Start() { if (alreadyInitialized) { GameObject.Destroy(this.gameObject); } else { Debug.Log("initialisation boutique"); SoomlaStore.Initialize(new boutique()); DontDestroyOnLoad(gameObject); alreadyInitialized = true; } }
void Start() { StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreInitialized; StoreEvents.OnCurrencyBalanceChanged += onCurrencyBalanceChanged; StoreEvents.OnUnexpectedStoreError += onUnexpectedStoreError; StoreEvents.OnMarketPurchase += onMarketPurchase; StoreEvents.OnItemPurchased += onItemPurchased; StoreEvents.OnMarketPurchaseStarted += onMarketPurchaseStarted; StoreEvents.OnItemPurchaseStarted += onItemPurchaseStarted; StoreEvents.OnMarketPurchaseCancelled += onMarketPurchaseCancelled; StoreEvents.OnMarketPurchaseDeferred += onMarketPurchaseDeferred; StoreEvents.OnRestoreTransactionsStarted += onRestoreTransactionsStarted; StoreEvents.OnRestoreTransactionsFinished += onRestoreTransactionsFinished; SoomlaStore.Initialize(new SoomlaAssets()); }
private void Start() { // Just in case we started it in the level already. It doesn't call OnLevelWasLoaded // when we first start the game in the editor. this.OnLevelWasLoaded(Application.loadedLevel); if (this.isFirstTime) { Debug.Log("GNOME: Subscribing to events"); this.SubscribeToStoreEvents(); Debug.Log("GNOME: Initializing store"); SoomlaStore.Initialize(new GnomeStoreAssets()); this.isFirstTime = false; } this.NotifyTokensChanged(); }
void Start() { StoreEvents.OnSoomlaStoreInitialized += onSoomlaStoreInitialized; StoreEvents.OnUnexpectedStoreError += onUnexpectedStoreError; GrowHighway.Initialize(); bool modelSync = true; bool stateSync = true; GrowSync.Initialize(modelSync, stateSync); GrowGifting.Initialize(); SoomlaProfile.Initialize(); GrowInsights.Initialize(); SoomlaStore.Initialize(new IAPAssets()); StartCoroutine("loadMainScene"); Invoke("loadGameNotAsync", 4); }