コード例 #1
0
    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();
    }
コード例 #2
0
ファイル: AdController.cs プロジェクト: uygaruyaniksoy/flags
 private void HandleOnAdLoaded(object sender, EventArgs e)
 {
     Debug.Log("AD_LOADED");
     if (FLogger.Ready)
     {
         FLogger.LogEvent("AD_LOADED");
     }
 }
コード例 #3
0
ファイル: AdController.cs プロジェクト: uygaruyaniksoy/flags
 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");
     }
 }
コード例 #4
0
ファイル: AdController.cs プロジェクト: uygaruyaniksoy/flags
 private void HandleOnAdOpened(object sender, EventArgs e)
 {
     Debug.Log("AD_OPENED");
     if (FLogger.Ready)
     {
         FLogger.LogEvent("AD_OPENED");
     }
 }
コード例 #5
0
ファイル: AdController.cs プロジェクト: uygaruyaniksoy/flags
 private void HandleOnAdLeavingApplication(object sender, EventArgs e)
 {
     Debug.Log("AD_LEAVING_APPLICATION");
     if (FLogger.Ready)
     {
         FLogger.LogEvent("AD_LEAVING_APPLICATION");
     }
 }
コード例 #6
0
ファイル: AdController.cs プロジェクト: uygaruyaniksoy/flags
 private void HandleOnAdClosed(object sender, EventArgs e)
 {
     Debug.Log("AD_CLOSED");
     if (FLogger.Ready)
     {
         FLogger.LogEvent("AD_CLOSED");
     }
     interstitial.Destroy();
 }
コード例 #7
0
 private void OnApplicationQuit()
 {
     if (FLogger.Ready)
     {
         FLogger.LogEvent(
             "APP_CLOSE",
             Firebase.Analytics.FirebaseAnalytics.ParameterLevelName,
             GetLevelName()
             );
     }
 }
コード例 #8
0
    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);
        }
    }