示例#1
0
        private void Update()
        {
            if (m_MusicPlayer.IsPlaying)
            {
                m_ArrowManager.UpdateArrows(m_MusicPlayer.TimeInBeats, m_SpeedMultiplier);
            }

            if (m_AutoPlay)
            {
                ArrowInfo info = m_ArrowManager.GetClosestArrowInfo(m_MusicPlayer.TimeInBeats);
                if (info.delta > 0 && info.arrow.Hittable)
                {
                    HitNote(info, 0);
                }
            }
        }
示例#2
0
        private void HandleMultiDirection(ArrowInfo arrowInfo, ArrowDirection recievedDirection)
        {
            if (ArrowDirectionUtility.IsInCombinationFor(recievedDirection, arrowInfo.direction))
            {
                ArrowDirection combination = ArrowDirectionUtility.Combine(recievedDirection, m_TemporaryArrowDirection);

                if (combination == arrowInfo.direction)
                {
                    HitNote(arrowInfo);
                    m_TemporaryArrowDirection = ArrowDirection.none;
                }
                else
                {
                    m_TemporaryArrowDirection = recievedDirection;
                }
            }
        }
示例#3
0
        private void ReceiveDirection(ArrowDirection direction)
        {
            ArrowInfo arrowInfo = m_ArrowManager.GetClosestArrowInfo(m_MusicPlayer.TimeInBeats);

            if (Mathf.Abs(arrowInfo.delta) > Judgement.Instance.Strictness)
            {
                return;
            }

            if (arrowInfo.direction == direction)
            {
                HandleSingleNote(arrowInfo);
            }
            else if (ArrowDirectionUtility.IsCombination(arrowInfo.direction))
            {
                HandleMultiDirection(arrowInfo, direction);
            }
        }
示例#4
0
 private void HitNote(ArrowInfo arrowInfo, float delta)
 {
     ScoreHandler.Instance.Evaluate(delta, arrowInfo.direction);
     arrowInfo.arrow.Hit();
 }
示例#5
0
 private void HitNote(ArrowInfo arrowInfo)
 {
     HitNote(arrowInfo, arrowInfo.delta);
 }
示例#6
0
 private void HandleSingleNote(ArrowInfo arrowInfo)
 {
     HitNote(arrowInfo);
     m_TemporaryArrowDirection = ArrowDirection.none;
 }