コード例 #1
0
    private void OnTriggerEnter(Collider other)
    {
        Transition transition = other.GetComponent <Transition>();

        if (transition && !transition.shared)
        {
            transition.StopAllCoroutines();

            if (direction)
            {
                transition.Flip(0f, setCoroutineSpeed);
            }
            else
            {
                transition.Flip(1f, setCoroutineSpeed);
            }
        }

        UI_Transition uI_Transition = other.GetComponent <UI_Transition>();

        if (uI_Transition)
        {
            uI_Transition.StopAllCoroutines();

            if (direction)
            {
                uI_Transition.Flip(0f, setCoroutineSpeed);
            }
            else
            {
                uI_Transition.Flip(1f, setCoroutineSpeed);
            }
        }

        if (other.GetComponent <FlipInteraction>())
        {
            other.GetComponent <FlipInteraction>().Interact();
        }
    }