示例#1
0
    private void GoodMove()
    {
        if (_timer < 1.2)
        {
            _streak++;
            if (PositiveSound.pitch < 2)
            {
                PositiveSound.pitch += 0.01f;
            }
        }
        else
        {
            if (_streak > _maxStreak)
            {
                _maxStreak = _streak;
            }
            _streak             = 1;
            PositiveSound.pitch = 1;
        }

        _numCleared++;
        PositiveSound.Play();

        if (_scoreHandler != null)
        {
            var score = _scoreHandler.CalucalteScore(_timer, _streak, _spawnSize);
            _reactionTimes.Add(_timer);
            _pointSpawner.AddPoints(score, _spawner.LastPosition, _streak > 1);
            _scoreHandler.AddScore(score);
        }
        _timer = 0;
        _spawner.AnimeSpawn();
        SpawnNewArrows();
    }