Пример #1
0
    void Update()
    {
        if (rewarded)
        {
            seeingGetSoulText = true;
            menuManager.OnBtnRewardNo();
            menuManager.RunGetSoulPanelFadeIn();
            menuManager.getSoulPanelText.text = "GOOD !" + "\nYOU GOT 100 SOUL !";
            PlayerInformation.SetFinalSeconds(120);
            PlayerInformation.IsWatched = true;
            PlayerInformation.AdTimeCheck();

            DatabaseManager.UpdateMoney(rewardAdAmountSoul);

            rewarded = false;
        }
    }
Пример #2
0
    void Update()
    {
        if (isPause)
        {
            //if (Application.platform == RuntimePlatform.Android)
            //{
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                if (SettingsManager.instance.seeingHelpPanel)
                {
                    SettingsManager.instance.OnHelpPanelExitButton();
                    return;
                }
                else if (SettingsManager.instance.seeingSettingPanel)
                {
                    SettingsManager.instance.OnSettingsExitButton();
                    return;
                }
                else if (seeingPausePanel)
                {
                    OnContinue();
                    return;
                }
            }
            //}
        }

        AddTimeScore();

        if (PlayerInformation.IsWatched) // 광고를 보았다면 3분 카운트.
        {
            PlayerInformation.AdTimeCheck();
        }



        //if (Application.platform == RuntimePlatform.Android)
        //{
        if (Input.GetKey(KeyCode.Escape) && Player.instance.isAlive && !Player.instance.seeingEnding)
        {
            OnPause();
        }
        //}
    }
Пример #3
0
    void Update()
    {
        if (PlayerInformation.IsWatched) // 광고를 보았다면 3분 카운트.
        {
            PlayerInformation.AdTimeCheck();

            if (!adsManager.seeingGetSoulText)
            {
                getSoulPanelText.text = "Wait for next ad" + "\n"
                                        + string.Format("{0:D2}", PlayerInformation.Minutes)
                                        + " : "
                                        + string.Format("{0:D2}", PlayerInformation.FinalSeconds);
            }
        }
        else if (!PlayerInformation.IsWatched && seeingTimer) // 타이머 패널 띄우고 있는 와중에 시간이 다 된다면,
        {
            StartCoroutine(GetSoulPanelFadeOut());
            StartCoroutine(GameRewardPanelFadeIn());
        }


        soulText.text               = string.Format("{0:N0}", PlayerInformation.SoulMoney); // Soul Money 표시
        HardBestScoreText.text      = string.Format("{0:N0}", PlayerInformation.BestScore);
        EasyBestScoreText.text      = string.Format("{0:N0}", PlayerInformation.EasyBestScore);
        EasyDestinationSlider.value = PlayerInformation.EasyBestScore;
        HardDestinationSlider.value = PlayerInformation.BestScore;
        SetDestination();

        // 안드로이드에서 뒤로가기 누르면 종료되는 처리
        //if(Application.platform == RuntimePlatform.Android)
        //{
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            // 로고 보고 있다면
            if (!PlayerInformation.IsSawLogo)
            {
                return;
            }

            SoundManager.instance.ButtonClick();
            // 난이도 창 보고 있다면
            if (seeingLevel)
            {
                OnBtnLevelOut();
                return;
            }
            // 구매 창 보고 있다면
            if (seeingChargePanel)
            {
                StartCoroutine(ChargePanelFadeOut());
                return;
            }
            // Store 창 보고 있다면
            if (seeingStorePanel && !seeingChargePanel)
            {
                StartCoroutine(storePanelFadeOut());
                return;
            }
            // Get Soul 창 보고 있다면
            if (seeingGetSoulPanel)
            {
                StartCoroutine(GetSoulPanelFadeOut());
                return;
            }
            // reward Ad 창 보고 있다면
            if (seeingRewardPanel)
            {
                StartCoroutine(GameRewardPanelFadeOut());
                return;
            }
            // Quit 창을 보고 있다면
            if (seeingQuitPanel)
            {
                StartCoroutine(GameQuitPanelFadeOut());
                return;
            }

            // help 창을 보고 있다면
            if (SettingsManager.instance.seeingHelpPanel)
            {
                SettingsManager.instance.OnHelpPanelExitButton();
                return;
            }
            //setting 창을 보고 있다면
            if (SettingsManager.instance.seeingSettingPanel)
            {
                SettingsManager.instance.OnSettingsExitButton();
                return;
            }
            if (!quitFadeInRunning && !rewardFadeInRunning && !getSoulFadeInRunning &&
                !storeFadeInRunning && !chargeFadeInRunning && !sceneTransition.isSceneTransitionRunning())
            {
                StartCoroutine(GameQuitPanelFadeIn());
            }
        }
        //}
    }