示例#1
0
 private void OnPlayerLostEvent(PlayerLost playerLostEvent)
 {
     _playerLost = true;
     Events.instance.Raise(
         new ShowInfoBox(
             "While adventuring you only have 3 lives. Hitting obstacles will remove one or more of them, so be careful!"));
     Events.instance.AddListener <ConfirmationBoxAnswered>(OnTutorialInfoReadRestart);
 }
示例#2
0
        private void OnPlayerLost(PlayerLost playerLostEvent)
        {
            if (SavedData.PlayTutorial)
            {
                return;
            }

            var timePlayed = Time.time - _startTime;

            SavedData.SecondsPlayedSinceLastAd += timePlayed;
            Debug.Log(string.Format("Played {0} seconds this session. Played a total of {1} since last ad watched.",
                                    timePlayed, SavedData.SecondsPlayedSinceLastAd));

            SavedData.HighScore = playerLostEvent.finalScore;
            ActivateMenu(gameOverMenu);

            ToggleBlackFade(true);

            //if (SavedData.SecondsPlayedSinceLastAd > c_secondsBeforeEachRewardedAd)
            //{
            //    Debug.Log(string.Format("Over {0} seconds since last ad was watched, showing rewarded ad button.", c_secondsBeforeEachRewardedAd));
            //    adsPanel.gameObject.SetActive(true);
            //    adsCanvasGroup.interactable = true;
            //    adsCanvasGroup.blocksRaycasts = true;
            //    adsCanvasGroup.alpha = 1f;
            //    adsPanel.DOMoveX(365f, 1.1f)
            //        .From(true)
            //        .SetEase(Ease.OutElastic, 1.1f, 0f);
            //    DOTween.ToAlpha(() => AdsButtonFlashImage.color, x => AdsButtonFlashImage.color = x, 0.47f, 0.5f)
            //        .SetEase(Ease.InQuad)
            //        .SetLoops(-1, LoopType.Yoyo);
            //    DOTween.To(() => AdsText.fontSize, x => AdsText.fontSize = x, 32, 0.5f)
            //        .SetEase(Ease.InQuad)
            //        .SetLoops(-1, LoopType.Yoyo);
            //    gameOverPanel.DOMoveX(-860f, 0.75f).From();
            //}
            //else
            //{
            //    adsPanel.gameObject.SetActive(false);
            //    gameOverPanel.DOMoveX(-860f, 0.5f).From();
            //}

            Cloud.Storage.Save();
        }
示例#3
0
 private void OnPlayerLost(PlayerLost playerLostEvent)
 {
     gameOver = true;
 }
示例#4
0
 private void OnPlayerLost(PlayerLost playerLostEvent)
 {
     _isBarrelrolling = false;
 }