private void HandleGameEnded() { if (FLogger.Ready) { FLogger.LogEvent( Firebase.Analytics.FirebaseAnalytics.EventLevelEnd, GetLevelName(), score.ToString() ); } var random = new System.Random(); if (random.Next(4) == 0) { PlayAd(); } float timeElapsed = Time.time - startTime; this.finished = true; if (StateToFlag || StateToFlag || StateToCapital) { StateText.GetComponent <TextMeshProUGUI>().text = ""; StateFlag.GetComponent <Image>().enabled = false; } GameObject.Find("text").GetComponent <CrazyTextEffect>().SetTimeElapsed((int)timeElapsed); GameObject.Find("text").GetComponent <CrazyTextEffect>().SetScore(score); GameObject.Find("text").GetComponent <CrazyTextEffect>().play = true; BackButton.SetActive(true); BackButton.transform.GetChild(0).GetComponent <TextMeshProUGUI>().enabled = true; SoundController.PlayFinish(); }
private void HandleOnAdLoaded(object sender, EventArgs e) { Debug.Log("AD_LOADED"); if (FLogger.Ready) { FLogger.LogEvent("AD_LOADED"); } }
private void HandleOnAdFailedToLoad(object sender, AdFailedToLoadEventArgs e) { Debug.Log("_______________________AD_FAILED_TO_LOAD with message: " + e.Message); if (FLogger.Ready) { FLogger.LogEvent("AD_FAILED_TO_LOAD"); } }
private void HandleOnAdOpened(object sender, EventArgs e) { Debug.Log("AD_OPENED"); if (FLogger.Ready) { FLogger.LogEvent("AD_OPENED"); } }
private void HandleOnAdLeavingApplication(object sender, EventArgs e) { Debug.Log("AD_LEAVING_APPLICATION"); if (FLogger.Ready) { FLogger.LogEvent("AD_LEAVING_APPLICATION"); } }
private void HandleOnAdClosed(object sender, EventArgs e) { Debug.Log("AD_CLOSED"); if (FLogger.Ready) { FLogger.LogEvent("AD_CLOSED"); } interstitial.Destroy(); }
private void OnApplicationQuit() { if (FLogger.Ready) { FLogger.LogEvent( "APP_CLOSE", Firebase.Analytics.FirebaseAnalytics.ParameterLevelName, GetLevelName() ); } }
private void StartGameFlow() { adController.RequestInterstitial(); if (FLogger.Ready) { FLogger.LogEvent( Firebase.Analytics.FirebaseAnalytics.EventLevelStart, Firebase.Analytics.FirebaseAnalytics.ParameterLevelName, GetLevelName() ); } StatesFlow = RandomizeStateList(new List <State>(States)); if (StateToFlag || StateToCapital) { transform.GetComponentsInChildren <SpriteRenderer>().ToList() .ForEach(spriteRenderer => spriteRenderer.enabled = false); } }