예제 #1
0
        private float ScaleBump(ScoreTicker scoreTicker)
        {
            var         timeSinceChange = scoreTicker.TimeSinceLastChange;
            const float bumpTime        = 0.1f;
            const float bumpAmount      = 0.2f;
            var         bump            = MathHelper.Clamp(bumpAmount * (1 - timeSinceChange / bumpTime), 0, bumpAmount);

            return(1 + bump);
        }
예제 #2
0
        public void CalculateScore()
        {
            var score = new ScoreCalculator().Calculate(_previousLevel);

            _allTickers = new List <ScoreTicker>();
            if (_transitionState == TransitionState.Next)
            {
                _allTickers.AddRange(_playerTickers = GetActivePlayersScores(score.PlayerScores));
                _allTickers.Add(_bonusTicker        = new ScoreTicker(0, score.BonusScore, _tickSound, 3f));
                _allTickers.Add(_totalTicker        = new ScoreTicker(score.StartTotalScore, score.TotalScore, _tickSound, 3f));
            }
            else
            {
                _allTickers.AddRange(_playerTickers = GetActivePlayersScores(score.PlayerTotalScores));
                _allTickers.Add(_totalTicker        = new ScoreTicker(0, score.TotalScore, _tickSound, 4f));
            }

            if (_transitionState == TransitionState.GameOver)
            {
                var time = DateTime.Now - Q19Game.Instance.StartTime;
            }
        }
예제 #3
0
 private void ActivateTicker(ScoreTicker ticker)
 {
     _activeTicker        = ticker;
     _activeTicker.Active = true;
 }