예제 #1
0
        private void SwingRatingCounter_didFinishEvent(ISaberSwingRatingCounter SaberSwingRatingCounter)
        {
            ScoreModel.RawScoreWithoutMultiplier(noteCutInfo, out int beforeCutRawScore, out int afterCutRawScore, out int cutDistanceRawScore);
            int blockScoreWithoutModifier = beforeCutRawScore + afterCutRawScore + cutDistanceRawScore;

            LiveData.BlockHitScores.Add(blockScoreWithoutModifier);
            //LiveData.Send();
        }
예제 #2
0
        public void HandleSaberSwingRatingCounterDidFinish(ISaberSwingRatingCounter swingRatingCounter)
        {
            GameNoteController gameNote = _notesBeingCut[swingRatingCounter];

            OnNoteCutFinished(gameNote.noteData, swingRatingCounter);

            _notesBeingCut.Remove(swingRatingCounter);
            swingRatingCounter.UnregisterDidFinishReceiver(this);
        }
예제 #3
0
            public void HandleSaberSwingRatingCounterDidFinish(ISaberSwingRatingCounter s)
            {
                ScoreModel.RawScoreWithoutMultiplier(s, n.info.cutDistanceToCenter, out int before, out int after, out int accuracy);

                SwingHolder sh = SwingTranspilerHandler.GetSwing(s as SaberSwingRatingCounter);

                if (sh != null)
                {
                    n.preswing  = sh.preswing;
                    n.postswing = sh.postswing;
                }

                n.score         = new int[] { before, accuracy, after };
                n.timeDeviation = n.info.timeDeviation;
                n.speed         = n.info.saberSpeed;
                n.cutPoint      = Utils.FloatArrayFromVector(n.info.cutPoint);
                n.saberDir      = Utils.FloatArrayFromVector(n.info.saberDir);

                n.info.swingRatingCounter.UnregisterDidFinishReceiver(this);
            }
예제 #4
0
        public void HandleSaberSwingRatingCounterDidFinish(ISaberSwingRatingCounter v)
        {
            ScoreModel.RawScoreWithoutMultiplier(v, noteCutInfos[v].cutDistanceToCenter, out int beforeCut, out int afterCut, out int cutDistance);

            if (noteCutInfos[v].saberType == SaberType.SaberA)
            {
                totalScoresLeft[0] += beforeCut;
                totalScoresLeft[1] += afterCut;
                totalScoresLeft[2] += cutDistance;
                ++totalCutCountLeft;
            }
            else
            {
                totalScoresRight[0] += beforeCut;
                totalScoresRight[1] += afterCut;
                totalScoresRight[2] += cutDistance;
                ++totalCutCountRight;
            }

            UpdateLabels();

            noteCutInfos.Remove(v);
        }
예제 #5
0
 private void OnSwingRatingCounterFinished(ISaberSwingRatingCounter afterCutRating)
 {
     afterCutRating.didFinishEvent -= OnSwingRatingCounterFinished;
     StartCoroutine(CalculateAccuracyAndFireEvents());
 }
예제 #6
0
 private void OnSwingRatingCounterFinished(ISaberSwingRatingCounter afterCutRating)
 {
     afterCutRating.didFinishEvent -= OnSwingRatingCounterFinished;
     FireAccuracyEvents();
 }
예제 #7
0
 public void HandleSaberSwingRatingCounterDidFinish(ISaberSwingRatingCounter saberSwingRatingCounter)
 {
     ScoreModel.RawScoreWithoutMultiplier(saberSwingRatingCounter, noteCutInfo.cutDistanceToCenter, out int beforeCutRawScore, out int afterCutRawScore, out int cutDistanceRawScore);
     LiveData.BlockHitScore = new int[] { beforeCutRawScore, afterCutRawScore, cutDistanceRawScore };
     noteCutInfo.swingRatingCounter.UnregisterDidFinishReceiver(this);
 }
예제 #8
0
        public void OnNoteCut(NoteData noteData, ISaberSwingRatingCounter cutRating)
        {
            ColorType        noteColor    = noteData.colorType;
            NoteCutDirection cutDirection = noteData.cutDirection;

            bool cutDirectionIsUp = (
                cutDirection == NoteCutDirection.UpLeft ||
                cutDirection == NoteCutDirection.Up ||
                cutDirection == NoteCutDirection.UpRight);

            bool cutDirectionIsDown = (
                cutDirection == NoteCutDirection.DownLeft ||
                cutDirection == NoteCutDirection.Down ||
                cutDirection == NoteCutDirection.DownRight);


            if (noteColor == ColorType.ColorA)             // Left
            {
                if (cutDirectionIsUp)
                {
                    if (ShowPreSwing)
                    {
                        _leftBottom.SetScore(cutRating.beforeCutRating);
                    }
                    if (ShowPostSwing)
                    {
                        _leftTop.SetScore(cutRating.afterCutRating);
                    }
                }
                else if (cutDirectionIsDown)
                {
                    if (ShowPreSwing)
                    {
                        _leftTop.SetScore(cutRating.beforeCutRating);
                    }
                    if (ShowPostSwing)
                    {
                        _leftBottom.SetScore(cutRating.afterCutRating);
                    }
                }
            }
            else if (noteColor == ColorType.ColorB)             // Right
            {
                if (cutDirectionIsUp)
                {
                    if (ShowPreSwing)
                    {
                        _rightBottom.SetScore(cutRating.beforeCutRating);
                    }
                    if (ShowPostSwing)
                    {
                        _rightTop.SetScore(cutRating.afterCutRating);
                    }
                }
                else if (cutDirectionIsDown)
                {
                    if (ShowPreSwing)
                    {
                        _rightTop.SetScore(cutRating.beforeCutRating);
                    }
                    if (ShowPostSwing)
                    {
                        _rightBottom.SetScore(cutRating.afterCutRating);
                    }
                }
            }
        }
예제 #9
0
 internal void g__HandleSaberSwingRatingCounterDidFinish(ISaberSwingRatingCounter afterCutRating)
 {
     this.g__UpdateScore();
     afterCutRating.didChangeEvent -= this.g__HandleSaberSwingRatingCounterDidChange;
     afterCutRating.didFinishEvent -= this.g__HandleSaberSwingRatingCounterDidFinish;
 }
예제 #10
0
 internal void g__HandleSaberSwingRatingCounterDidChange(ISaberSwingRatingCounter afterCutRating, float rating)
 {
     this.g__UpdateScore();
 }