Пример #1
0
 public void End()
 {
     Guard2_con.StopLookAt();
     Guard1_con.StopLookAt();
     Guard1_con.StopRota();
     Guard2_con.StopRota();
 }
Пример #2
0
 void Scene1()
 {
     Timer = Timer1_5;
     Door1.GetComponent <Object_Door>().DoorSwitch();
     Guard1_con.SetLookAt(playerHead);
     Guard1_con.PlaySound(Dialogs[1], true);
     EventState = 1;
     Guard2_con.AnimTrigger(2);
 }
Пример #3
0
    void Scene2()
    {
        Guard1_con.SetRota(leftTurn, true);
        Guard1_con.SetPath(Path1, false);
        Guard1_con.StopLookAt();
        Guard2_con.SetRota(leftTurn, true);
        Guard2_con.SetPath(Path1, false);
        //Guard2_con.SetLookAt(playerHead);
        EventState = 3;
        Timer      = Timer3;

        ActiveTimer2   = true;
        TimerSecondary = 5;
        EventState2    = 1;


        Check2 = true;
    }
Пример #4
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);
    }
Пример #5
0
    void IntroUpdate()
    {
        if (ActiveTimer)
        {
            Timer -= Time.deltaTime;
        }
        if (runningAway)
        {
            RunawayTimer -= Time.deltaTime;
        }

        if (RunawayTimer <= 0.0f && runningAway == true)
        {
            if (EventState == -5)
            {
                Escape5();
            }
            if (EventState == -4)
            {
                Escape4();
            }
            if (EventState == -3)
            {
                Escape3();
            }
            if (EventState == -2)
            {
                Escape2();
            }
            if (EventState == -1)
            {
                Escape1();
            }
        }

        if (Timer <= 0.0f && Start == false)
        {
            Timer = Timer1;
            Guard1_con.PlaySound(Dialogs[0], true);

            if (grabbed == false)
            {
                SCP_UI.instance.ShowTutorial("tutograb");
            }
            Start = true;
        }

        if (grabbed == false && Item == null)
        {
            SCP_UI.instance.ShowTutorial("tutoinv1");
            grabbed = true;
        }



        if (Timer <= 0.0f && StopTimer == false && Start == true)
        {
            if (EventState == -13)
            {
                EVRefuse3();
            }
            if (EventState == -12)
            {
                EVRefuse2();
            }
            if (EventState == -11)
            {
                EVRefuse1();
            }


            if (EventState == 3)
            {
                Scene3();
                StopTimer = true;
            }
            if (EventState == 2)
            {
                Scene2();
            }
            if (EventState == 1)
            {
                Scene1_5();
            }

            if (EventState == 0)
            {
                Scene1();
            }
        }



        if (ActiveTimer2)
        {
            TimerSecondary -= Time.deltaTime;
        }
        if (TimerSecondary <= 0.0f && StopTimer2 == false)
        {
            if (EventState2 == 2)
            {
                AsyncScene_2();
            }
            if (EventState2 == 1)
            {
                AsyncScene_1();
            }
        }



        if (Check1 == true)
        {
            if (Trigger1.GetComponent <BoxTrigger>().GetState())
            {
                Check1      = false;
                ActiveTimer = true;
                Scene1_6();
            }
        }

        if (Check3 == true)
        {
            if (Trigger3.GetComponent <BoxTrigger>().GetState())
            {
                if (!back1)
                {
                    Guard1_con.PlaySound(Dialogs[5], true);
                    back1 = true;
                }
                Guard1_con.ResumePath();
                Guard1_con.StopRota();

                Guard1_con.AnimTrigger(1, false);

                Guard1_con.StopLookAt();
                Guard2_con.ResumePath();

                LastState = EventState;

                Check3      = false;
                Check2      = true;
                ActiveTimer = true;
                runningAway = false;
                EventState  = 3;
            }
        }

        if (Check2 == true)
        {
            if (!Trigger2.GetComponent <BoxTrigger>().GetState() && EventState != -1)
            {
                Guard1_con.StopSound();
                Guard2_con.StopSound();
                EventState = LastState;
                if (!back1)
                {
                    RunawayTimer = 6;
                    Guard1_con.PlaySound(Dialogs[2], true, true);
                }

                if (Conver != -1)
                {
                    StopCoroutine(co);
                    Conver = -1;
                }

                Guard1_con.SetLookAt(playerHead);
                ActiveTimer  = false;
                ActiveTimer2 = false;
                runningAway  = true;

                Guard1_con.SetRota(Player.transform);
                Guard2_con.SetLookAt(playerHead);
                Guard2_con.PausePath();
                Guard1_con.PausePath();

                Check2 = false;
                Check3 = true;
            }
        }

        if (Check4 == true)
        {
            if (Trigger4.GetComponent <BoxTrigger>().GetState())
            {
                Guard1_con.StopPursuit();
                Guard1_con.PlaySound(Gunshot);
                Player.GetComponent <Player_Control>().Death(0);
                GameController.instance.deathmsg = Localization.GetString("deathStrings", "death_intro");
                Check4      = false;
                Check3      = false;
                Check2      = false;
                runningAway = false;
                Guard1_con.AnimTrigger(-1, true);
            }
        }
    }
Пример #6
0
    void AsyncScene_1()
    {
        Conver = Random.Range(0, ConverA.Length);

        switch (GlobalValues.mapseed)
        {
        case "IntroConvo1":
        {
            Conver = 0;
            break;
        }

        case "IntroConvo2":
        {
            Conver = 1;
            break;
        }

        case "IntroConvo3":
        {
            Conver = 2;
            break;
        }

        case "IntroConvo4":
        {
            Conver = 3;
            break;
        }

        case "IntroConvo5":
        {
            Conver = 4;
            break;
        }
        }


        Debug.Log(Conver);



        Guard2_con.PlaySound(ConverB[Conver]);
        Guard1_con.PlaySound(ConverA[Conver]);


        if (Conver == 0)
        {
            co = Convo1();
        }
        if (Conver == 1)
        {
            co = Convo2();
        }
        if (Conver == 2)
        {
            co = Convo3();
        }
        if (Conver == 3)
        {
            co = Convo4();
        }
        if (Conver == 4)
        {
            co = Convo5();
        }

        StartCoroutine(co);
        Guard1_con.SetLookAt(talktome);
        EventState2    = 2;
        TimerSecondary = 4.5f;
    }