Exemple #1
0
    public void NpcToFirstPlane(Person npc, bool shadow)
    {
        Debug.Log(Interlocutor1.GetComponent <NpcController>().NpcType);
        TextBoxCanvas.SetActive(true);

        //GameObject character = Instantiate(npc) as GameObject;
        if (Interlocutor1.activeSelf)
        {
            if (Interlocutor1.GetComponent <NpcController>().NpcType == "Showman")
            {
                Interlocutor1.GetComponent <NpcController>().Refresh(npc, 0, shadow);
            }
            else if (!Interlocutor2.activeSelf)
            {
                Interlocutor2.SetActive(true);
                Interlocutor2.GetComponent <NpcController>().Refresh(npc, 0, shadow);
            }
            else
            {
                Interlocutor2.SetActive(true);
                Interlocutor2.GetComponent <NpcController>().Refresh(npc, 1, shadow);
            }
        }
        //else  if (ShowPhase== ShowStatus.PHASE2)
        //{
        //    Interlocutor2.SetActive(true);
        //    Interlocutor2.GetComponent<NpcController>().Refresh(npc, 0, shadow);
        //}
        else
        {
            Interlocutor1.SetActive(true);
            Interlocutor1.GetComponent <NpcController>().Refresh(npc, 0, shadow);
        }
        //character.transform.localPosition = new Vector3(0,0,-69);
    }
Exemple #2
0
    public void SwapCamera(int shot, CinemachineBlendDefinition.Style blend)
    {
        Interlocutor1.GetComponent <NpcController>().Reset();
        Interlocutor2.GetComponent <NpcController>().Reset();

        gameObject.GetComponent <CinemachineBrain>().m_DefaultBlend.m_Style = blend;

        foreach (GameObject cam in Cams)
        {
            if (cam == Cams[shot])
            {
                cam.GetComponent <CinemachineVirtualCamera>().Priority = 2;
                CurrentCam = cam;
                StartCoroutine(UpdateOverlap());
            }
            else
            {
                cam.GetComponent <CinemachineVirtualCamera>().Priority = 1;
            }
        }
    }