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
        protected override void Start()
        {
            base.Start();

            if (!(RStation = GetComponent <RhythmoStation>()))
            {
                Debug.LogError("No Station bind to the syncrhonizer...");
            }

            if (!(m_SpriteRenderer = GetComponent <SpriteRenderer>()))
            {
                Debug.LogError("No m_SpriteRenderer bind to the syncrhonizer...");
            }
            else
            {
                m_ClassicMat = m_SpriteRenderer.material;
            }
        }
Ejemplo n.º 3
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);
            }
        }