Ejemplo n.º 1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.CompareTag("Door"))
        {
            m_CanUse   = true;
            m_NextRoom = collision.gameObject;
        }

        if (isInteractable)
        {
            if (collision.gameObject.CompareTag("Player") && m_CanUse)
            {
                collision.gameObject.transform.position = m_NextRoom.transform.GetChild(0).transform.position;
                collision.gameObject.transform.parent   = m_NextRoom.transform.parent;
                DoorChecker door = m_NextRoom.gameObject.GetComponent <DoorChecker>();
                door.m_Black.SetActive(false);
                door.room.EnableRoom();

                m_RoomCamera.SetActive(false);
                m_Black.SetActive(true);
                room.DisableRoom();

                m_Player.enabled = false;
                m_Player.gameObject.GetComponent <Rigidbody2D>().velocity = Vector3.zero;

                m_GameManager.NextRoom(door.m_RoomCamera);
            }
        }
    }
Ejemplo n.º 2
0
        public void TestCards()
        {
            var checker = new DoorChecker();
            var theSame = checker.FindRepeated();

            if (theSame.Any())
            {
                throw new Exception();
            }
        }