Ejemplo n.º 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);
                }
            }
        }
Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 4
0
 private void HitNote(ArrowInfo arrowInfo, float delta)
 {
     ScoreHandler.Instance.Evaluate(delta, arrowInfo.direction);
     arrowInfo.arrow.Hit();
 }
Ejemplo n.º 5
0
 private void HitNote(ArrowInfo arrowInfo)
 {
     HitNote(arrowInfo, arrowInfo.delta);
 }
Ejemplo n.º 6
0
 private void HandleSingleNote(ArrowInfo arrowInfo)
 {
     HitNote(arrowInfo);
     m_TemporaryArrowDirection = ArrowDirection.none;
 }