コード例 #1
0
    public override void EventStart()
    {
        guard.AnimTrigger(3, true);
        guard.SetRota(contraLookAt);
        scp.Event_Spawn(true, scpSpawn.position);
        scp.transform.rotation = scpSpawn.transform.rotation;
        inDoorsClosed          = true;
        isStarted = true;

        GameController.instance.canSave = false;

        GameController.instance.setValue(x, y, 1, 0);
        GameController.instance.setValue(x, y, 2, 0);
        GameController.instance.setValue(x, y, 3, 0);
    }
コード例 #2
0
    public override void EventUpdate()
    {
        Timer -= Time.deltaTime;

        if (Timer <= 0.0f && StopTimer == false)
        {
            GameController.instance.player.GetComponent <Player_Control>().FakeBlink(1f);
            GameController.instance.ambianceController.ChangeAmbiance(NewAmbiance, 6);
            GameController.instance.GlobalSFX.PlayOneShot(blackout);
            GameController.instance.npcController.mainList[(int)npc.scp173].Spawn(false, GameController.instance.transform.position);
            StopTimer = true;
            SCP_UI.instance.ShowTutorial("tutorun");
            EventFinished();
        }

        if (Timer <= 4f && step == false && StopTimer == false)
        {
            GameController.instance.player.GetComponent <Player_Control>().FakeBlink(1f);
            GameController.instance.GlobalSFX.PlayOneShot(blackout);
            GameController.instance.npcController.mainList[(int)npc.scp173].Spawn(false, Anchor2.transform.position);
            step = true;
        }


        if (check2 == true)
        {
            if (trigger2.GetComponent <BoxTrigger>().GetState())
            {
                Sci_.SetRota(Anchor1.transform);
                Gua_.SetRota(Anchor1.transform);
                Sci_.SetPath(Path, false);
                Gua_.SetPath(Path, false);
                Gua_.PlaySound(Dialog);
                SubtitleEngine.instance.playVoice("scene_BreachStart_1", true);

                GameController.instance.npcController.mainList[(int)npc.scp173].Spawn(false, Anchor1.transform.position);
                GameController.instance.player.GetComponent <Player_Control>().FakeBlink(0.5f);
                GameController.instance.GlobalSFX.PlayOneShot(blackout);

                GameController.instance.npcController.mainList[(int)npc.scp173].transform.rotation = Anchor1.transform.rotation;
                check2    = false;
                StopTimer = false;
                Timer     = 10;
            }
        }

        if (check1 == true)
        {
            if (trigger1.GetComponent <BoxTrigger>().GetState())
            {
                SCP_UI.instance.ShowTutorial("tutodead");
                check1 = false;
            }
        }
    }
コード例 #3
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);
            }
        }
    }
コード例 #4
0
    public override void EventUpdate()
    {
        base.EventUpdate();

        timer -= Time.deltaTime;
        if (timer <= 0)
        {
            switch (status)
            {
            case 0:
            {
                sci.SetPath(Path1);
                guard.PlaySound(Voice1, true);
                guard.SetRota(sci.gameObject.transform);
                timer  = time1;
                status = 1;
                break;
            }

            case 1:
            {
                GameController.instance.GlobalSFX.PlayOneShot(vent);
                sci.PlaySound(Voice2, true);
                guard.SetRota(lookat);
                sci.SetRota(lookat);
                timer  = time2;
                status = 2;
                break;
            }

            case 2:
            {
                GameController.instance.player.GetComponent <Player_Control>().FakeBlink(time3 + time4 + time5);
                timer  = time3;
                status = 3;
                break;
            }

            case 3:
            {
                sci.PlaySFX(cronch);
                sci.AnimTrigger(-1, true);
                timer  = time4;
                status = 4;
                break;
            }

            case 4:
            {
                guard.PlaySFX(cronch);
                guard.AnimTrigger(-2, true);
                GameController.instance.npcController.mainList[(int)npc.scp173].Event_Spawn(true, Spawn173.transform.position);
                GameController.instance.npcController.mainList[(int)npc.scp173].transform.rotation = Spawn173.transform.rotation;
                timer  = time5;
                status = 5;
                break;
            }

            case 5:
            {
                EventFinished();
                break;
            }
            }
        }
    }