コード例 #1
0
        IEnumerator CO_ShowComplete()
        {
            int id = 0;

            while (id < numStars)
            {
                Stars[id].Gain();
                GameResultUI.I.BonesCounter.IncreaseByOne();
                yield return(new WaitForSeconds(0.2f));

                id++;
            }

            if (numStars > 0)
            {
                bgTween.Restart();
            }

            AudioManager.I.PlaySound(numStars > 0 ? SfxCompleteWithStars : SfxCompleteNoStars);
            ContinueScreen.Show(Continue, ContinueScreenMode.Button, numStars > 0);
            ContinueScreen.SetRetryAction(Retry, numStars <= 0);

            // We add the bones regardless of where we played this game from
            AppManager.I.Player.AddBones(numStars);
        }
コード例 #2
0
        IEnumerator StartReward()
        {
            if (FirstContactManager.I.IsSequenceFinished())
            {
                int rnd = Random.Range(1, 3);
                switch (rnd)
                {
                case 1:
                    KeeperManager.I.PlayDialog(Database.LocalizationDataId.Reward_Big_1);
                    break;

                case 3:
                    KeeperManager.I.PlayDialog(Database.LocalizationDataId.Reward_Big_2);
                    break;

                default:
                    KeeperManager.I.PlayDialog(Database.LocalizationDataId.Reward_Big_3);
                    break;
                }
            }

            // Wait animation ending before show continue button
            yield return(new WaitForSeconds(8.0f));

            ContinueScreen.Show(Continue, ContinueScreenMode.Button, true);
            //if (FirstContactManager.I.IsFinished()) {
            //    AnturaSpaceBtton.gameObject.SetActive(true);
            //    btAnturaTween = AnturaSpaceBtton.transform.DOScale(0.1f, 0.4f).From().SetEase(Ease.OutBack);
            //}
            yield return(null);
        }
コード例 #3
0
        IEnumerator CO_Show(List <EndsessionResultData> _sessionData, int _alreadyUnlockedRewards)
        {
            yield return(null);

            SetRewardsGos();

            // Show minigames
            Bar.Hide();
            Minigames.Show(_sessionData);
            yield return(new WaitForSeconds(1));

            // Show bar
            if (_alreadyUnlockedRewards > 2)
            {
                _alreadyUnlockedRewards = 2;
            }
            while (_alreadyUnlockedRewards > -1)
            {
                Bar.Achievements[_alreadyUnlockedRewards].AchieveReward(true, true);
                _alreadyUnlockedRewards--;
            }
            Bar.Show(_sessionData.Count * 3);
            //GameResultUI.I.BonesCounter.Show();
            while (!Bar.ShowTween.IsComplete())
            {
                yield return(null);
            }

            // Start filling bar and/or show Continue button
            releasedMinigamesStars = Minigames.CloneStarsToMainPanel();
            if (releasedMinigamesStars.Count > 0)
            {
                minigamesStarsToBarTween = DOTween.Sequence();
                Vector2 to = Bar.GetComponent <RectTransform>().anchoredPosition;
                for (int i = 0; i < releasedMinigamesStars.Count; ++i)
                {
                    RectTransform mgStar = releasedMinigamesStars[i];
                    minigamesStarsToBarTween.Insert(i * 0.2f, mgStar.DOAnchorPos(to, 0.3f).OnComplete(() => Bar.IncreaseBy(1)))
                    .Join(mgStar.GetComponent <Image>().DOFade(0, 0.2f).SetDelay(0.1f).SetEase(Ease.InQuad))
                    .Join(mgStar.DORotate(new Vector3(0, 0, 180), 0.3f));
                }
                yield return(new WaitForSeconds(minigamesStarsToBarTween.Duration()));
            }
            AudioManager.I.PlaySound(SfxShowContinue);
            ContinueScreen.Show(Continue, ContinueScreenMode.Button, true);
        }
コード例 #4
0
        void Update()
        {
            // SceneTransitioner - SPACE to show/hide
            if (Input.GetKeyDown(KeyCode.Space))
            {
                SceneTransitioner.Show(!SceneTransitioner.IsShown);
            }

            // Subtitles - T to show text, SHIFT+T to show keeper text, CTRL/CMD+T to close
            if (WidgetSubtitles.I != null)
            {
                if (Input.GetKeyDown(KeyCode.T))
                {
                    if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl) || Input.GetKey(KeyCode.LeftCommand) || Input.GetKey(KeyCode.RightCommand))
                    {
                        WidgetSubtitles.I.Close();
                    }
                    else
                    {
                        var testData = new Database.LocalizationData();
                        testData.Arabic = "من فضلك، حاول اصطياد البعض منها. من فضلك، حاول التقاطها.";
                        WidgetSubtitles.I.DisplaySentence(testData, 2, Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift));
                    }
                }
            }

            // Continue button - C to show, SHIFT+C to show fullscreen-button on the side
            if (WidgetSubtitles.I != null)
            {
                if (Input.GetKeyDown(KeyCode.C))
                {
                    ContinueScreenMode continueScreenMode = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift)
//                        ? ContinueScreenMode.FullscreenBg : ContinueScreenMode.ButtonWithBgFullscreen;
                        ? ContinueScreenMode.ButtonFullscreen : ContinueScreenMode.ButtonWithBg;
                    ContinueScreen.Show(null, continueScreenMode);
                }
            }

            // Popup - P to show/hide
            if (Input.GetKeyDown(KeyCode.P))
            {
                WidgetPopupWindow.I.Show(!WidgetPopupWindow.IsShown);
            }
        }
コード例 #5
0
 public void ContinueScreen_ShowFullscreenBg()
 {
     ContinueScreen.Show(null, ContinueScreenMode.FullscreenBg);
 }
コード例 #6
0
 public void ContinueScreen_ShowButtonFullscreen()
 {
     ContinueScreen.Show(null, ContinueScreenMode.ButtonFullscreen);
 }
コード例 #7
0
 public void ContinueScreen_ShowButtonWithBg()
 {
     ContinueScreen.Show(null, ContinueScreenMode.ButtonWithBg);
 }