예제 #1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.CompareTag("bottom"))
        {
            gameObject.SetActive(false);
        }

        if (collision.gameObject.CompareTag("CatCollider"))
        {
            MyLuckyCatPanel.SetActive(true);
            RedPlatePanel.SetActive(false);
            stageCutton.GetComponent <Animation>().Play("CuttonDown"); //커튼 내리기
        }
    }
예제 #2
0
    IEnumerator Coroutine3()
    {
        //대사 3줄
        yield return(new WaitForSeconds(0.5f));

        textArr3[0].SetActive(true);
        yield return(new WaitForSeconds(1.5f));

        textArr3[0].SetActive(false);
        textArr3[1].SetActive(true);
        yield return(new WaitForSeconds(INTERVAL_TIME));

        textArr3[1].SetActive(false);

        //고양이 초기화
        CatObj.SetActive(false);
        CatObj.SetActive(true);

        //시작
        stageCutton.GetComponent <Animation>().Play("CuttonUp"); //커튼 올리기
        yield return(new WaitForSeconds(0.125f));

        RedPlatePanel.SetActive(true); //빨간 접시 내려오도록
    }