示例#1
0
        private void LateUpdate()
        {
            var data = dataManager.Load(); // FIXME

            slider.value          = Mathf.MoveTowards(slider.value, scoreCalculations.LevelProgress, Time.deltaTime * speed);
            currentLevel.color    = config.Get(data.Level).Background;
            nextLevel.color       = config.Get(data.Level + 1).Background;
            currentLevelText.text = data.Level.ToString("0");
            nextLevelText.text    = (data.Level + 1).ToString("0");
        }
示例#2
0
        public void Refresh(IBubbleScore score)
        {
            current          = config.Get(score.Exponent);
            background.color = outline.color = current.Background;
            var valueStr   = Mathf.Pow(2, score.Exponent % 10).ToString("0");
            var textConf   = font[valueStr];
            var suffixConf = GetSuffix(score);

            text.sprite   = textConf.Sprite;
            suffix.sprite = suffixConf.Sprite;

            Vector3 textPosition = Vector3.right * -suffixConf.Width / 2f;
            Vector3 suffixOffset = Vector3.right * (textConf.Width + suffixConf.Width) / 2f;

            text.transform.localPosition = textPosition;
            suffix.transform.position    = text.transform.position + suffixOffset;// + suffixOffset;
            ShowOutline(score.Exponent);
        }