Assets.Core.ComboHandler.StartCombo C# (CSharp) Method

StartCombo() public method

public StartCombo ( ) : void
return void
        public void StartCombo()
        {
            _isCalledInThisFrame = true;

            // Reset current presses
            _currentPresses = new List<PressType>();

            // Choose new goal
            var combos = Constants.Combos;

            if (!_isFirstPose) {
                int random = Random.Range (0, 100);

                if(random <= TapTapTapFrequency)
                {
                    _goalId = 0;
                    _currentGoal = combos [_goalId];
                }
                else
                {
                    _goalId = new System.Random().Next(0, combos.Count);
                    _currentGoal = combos[_goalId];
                }

            } else {
                _goalId = 0;
                _currentGoal = combos [_goalId];
                _isFirstPose = false;
            }

            _playerAnimationControl.PickAnimation();

            //PoseButton.SetActive(false);

            // Print goal
            GoalText.text = "Goal:";
            foreach (var goal in _currentGoal)
            {
                GoalText.text += " " + goal;
            }

            /*
            for (int i = 0; i < _currentGoal.Count; i++) {
                if(_currentGoal[0] == PressType.Long)
            }
            */

            if (_currentGoal [0] == PressType.Short) {
                OneImg.sprite = ShortSprite;
            }
            else
            {
                OneImg.sprite = LongSprite;
            }

            if (_currentGoal [1] == PressType.Short) {
                TwoImg.sprite = ShortSprite;
            }
            else
            {
                TwoImg.sprite = LongSprite;
            }

            if (_currentGoal [2] == PressType.Short) {
                ThreeImg.sprite = ShortSprite;
            }
            else
            {
                ThreeImg.sprite = LongSprite;
            }

            //_playerAnimationControl.ReadyToPose();

            //_control.DisableMovement();
        }