コード例 #1
0
        override public void Setup(PopupConfig genericConfig)
        {
            base.Setup(genericConfig);
            var config = genericConfig as GenericPopupConfig;

            bannerText.text = config.title;
            mainText.text   = config.mainText;
        }
コード例 #2
0
        override public void Setup(PopupConfig genericConfig)
        {
            base.Setup(genericConfig);
            var config = genericConfig as SettingsPopupConfig;

            bannerText.text     = config.title;
            appVersionText.text = config.appVersion;
            userIDText.text     = config.userID;

            musicToggle.isOn = GlobalState.User.settings.musicOn;
            musicToggle.onValueChanged.AddListener(value => GlobalState.User.settings.musicOn = value);

            sfxToggle.isOn = GlobalState.User.settings.sfxOn;
            sfxToggle.onValueChanged.AddListener(value => GlobalState.User.settings.sfxOn = value);
        }
コード例 #3
0
        override public void Setup(PopupConfig genericConfig)
        {
            base.Setup(genericConfig);
            var config = genericConfig as WinLevelPopupConfig;

            for (long starIndex = 0, filledStars = config.stars; starIndex < filledStars; ++starIndex)
            {
                starPositions[starIndex].GetComponent <Image>().sprite = filledStar;
            }

            score.text    = "Score: " + config.score.ToString("N0");
            topScore.text = "Top Score: " + config.topScore.ToString("N0");

            GlobalState.EventService.Dispatch(new TutorialProgressEvent(TutorialTrigger.PostLevelPopup, config.level));
        }
コード例 #4
0
        override public void Setup(PopupConfig genericConfig)
        {
            base.Setup(genericConfig);
            config = genericConfig as PreLevelPopupConfig;

            bannerText.text = "Level " + config.level.ToString();

            for (long starIndex = 0, filledStars = config.stars; starIndex < filledStars; ++starIndex)
            {
                starPositions[starIndex].GetComponent <Image>().sprite = filledStar;
            }

            config.closeActions = new List <Action> {
                () => GlobalState.SceneService.Reset()
            };
            config.affirmativeActions = new List <Action> {
                TransitionToLevel
            };

            GlobalState.EventService.Dispatch(new TutorialProgressEvent(TutorialTrigger.PreLevelPopup, config.level));
        }
コード例 #5
0
ファイル: Popup.cs プロジェクト: gauravSGN/snoopy-gs-update
 virtual public void Setup(PopupConfig config)
 {
     genericConfig = config;
 }
コード例 #6
0
 public void EnqueueWithDelay(float delay, PopupConfig config)
 {
     StartCoroutine(DelayedEnqueue(delay, config));
 }
コード例 #7
0
 public void Enqueue(PopupConfig config)
 {
     popupQueue.Enqueue(config, (int)config.Priority);
     ShowNextPopup();
 }
コード例 #8
0
        private IEnumerator DelayedEnqueue(float delay, PopupConfig config)
        {
            yield return(new WaitForSeconds(delay));

            Enqueue(config);
        }