Ejemplo n.º 1
0
        public void initScoreUI()
        {
            _radialUI = new RadialAnswerContainer(_centerRose, _progressTexture, 500f, 150f
                , "Sometimes you win...\nSomtimes you loose...");

            int bestScore = 0;
            PlayerResultUI bestPlayer = null;

            for (int i = 0; i < 4; ++i)
            {
                PlayerResultUI ui = new PlayerResultUI(i, false, "Score : " + PlayerData.Instance[i].Score
                    , _playerUIBack);

                if (PlayerData.Instance[i].Score > bestScore)
                {
                    bestScore = PlayerData.Instance[i].Score;
                    bestPlayer = ui;
                }

                _radialUI.ContainedUIs.Add(ui);
            }

            bestPlayer.IsBest = true;

            _radialUI.Position = MyGame.ScreenCenter;
        }
Ejemplo n.º 2
0
        private void initAnswerUI(List<OrderedAnswer> orderedAnswers )
        {
            RadialAnswerContainer contain = new UIElements.RadialAnswerContainer(_radialUICenter, _radialProgress, 500f, 150f
                , _lastQestionText);
            contain.TouchCenterCallback = fastForwardAnswerWait;

            _radialUI = contain;
            bool best = true;

            int count = 0;

            foreach (OrderedAnswer answer in orderedAnswers)
            {
                if (count >= 4)
                {
                    break;
                }

                UIElements.PlayerResultUI ansUI = new UIElements.PlayerResultUI(
                    answer.id
                    , best
                    , "answer : " + (answer.value.ToString() == "void" ? "Timeout" : answer.value.ToString())
                    , _playerUIBack);

                _radialUI.ContainedUIs.Add(ansUI);
                best = false;
                ++count;
            }

            _radialUI.Position = MyGame.ScreenCenter;
        }