Ejemplo n.º 1
0
        private void OnTriggerExit2D(Collider2D collision)
        {
            RhythmoStation LinkSRStation = collision.gameObject.GetComponent <RhythmoStation>();

            if (LinkSRStation)
            {
                CanSyncBeat = false;
                LinkSRStation.EnableFeedback(false);
                EnableFeedback(false);
            }
        }
Ejemplo n.º 2
0
        private void OnTriggerStay2D(Collider2D collision)
        {
            LinkSRStation = collision.gameObject.GetComponent <RhythmoStation>();
            if (!LinkSRStation)
            {
                CanSyncBeat = false;
                return;
            }

            if (LockBeat)
            {
                return;
            }

            if (m_CurrentState == ERhythmoPawnState.FaceDown)
            {
                if (LinkSRStation.ZOrder > ZOrder)
                {
                    LinkSRStation.EnableFeedback(true);
                    EnableFeedback(true);
                    CanSyncBeat      = true;
                    gameObject.layer = LayerMask.NameToLayer("Default");
                }
            }
            else if (m_CurrentState == ERhythmoPawnState.FaceUp)
            {
                if (LinkSRStation.ZOrder < ZOrder)
                {
                    LinkSRStation.EnableFeedback(true);
                    EnableFeedback(true);
                    CanSyncBeat      = true;
                    gameObject.layer = LayerMask.NameToLayer("Ignore Raycast");
                }
            }
            else
            {
                CanSyncBeat = false;
                LinkSRStation.EnableFeedback(false);
                EnableFeedback(false);
            }
        }