コード例 #1
0
    void Scene3()
    {
        if (back1)
        {
            FinalEmpty[1] = DI_Done2[Random.Range(0, DI_Done2.Length)];
            FinalEmpty[0] = DI_Done1[Random.Range(1, DI_Done1.Length)];
            Guard1_con.SetSeq(FinalEmpty, true);
        }
        else
        {
            Guard1_con.PlaySound(DI_Done1[0], true);
        }

        Door3.GetComponent <Object_Door>().DoorSwitch();
        Guard1_con.SetLookAt(playerHead);
        Guard2_con.StopLookAt();
        Guard2_con.PausePath();

        Check2 = false;
        NextScene.SetActive(true);
    }
コード例 #2
0
    // Update is called once per frame
    void Update()
    {
        if (checking1 == true)
        {
            if (check1.GetComponent <BoxTrigger>().GetState())
            {
                if (RandOrScript == 0)
                {
                    Guard1_.SetSeq(FinalMessage);
                }
                else
                {
                    Guard1_.PlaySound(SCRIPTED[Random.Range(0, SCRIPTED.Length)]);
                }

                Guard2_.SetPath(path1);
                D1_.SetPath(path1);
                Guard2_.AnimTrigger(1, true);
                Sci1_.AnimTrigger(2, true);
                Sci1_.SetPath(path2);
                checking1 = false;
                checking2 = true;
            }
        }

        if (checking2 == true)
        {
            if (check2.GetComponent <BoxTrigger>().GetState())
            {
                Jan_.AnimTrigger(2, true);
                Jan_.SetPath(path3);
                Sci2_.PlaySound(Scientistdiag);
                checking2 = false;
            }
        }
    }