// Start is called before the first frame update
    void OnEnable()
    {
        objPlayer = GameController.instance.player;
        d1_       = d1.GetComponent <EV_Puppet_Controller>();
        d2_       = d2.GetComponent <EV_Puppet_Controller>();
        sci_      = sci.GetComponent <EV_Puppet_Controller>();
        sci2_     = sci2.GetComponent <EV_Puppet_Controller>();
        guard_    = guard.GetComponent <EV_Puppet_Controller>();

        GameController.instance.ChangeMusic(MusicChange);
    }
    void StartEvent()
    {
        if (GlobalValues.playIntro)
        {
            GameController.instance.ambianceController.ChangeAmbiance(Ambiance, 8);
            MusicPlayer.instance.StartMusic(MusIntro);
            GameController.instance.StopTimer  = false;
            GameController.instance.doGameplay = false;
            GameController.instance.playercache.playerWarp(playerPos.transform.position, playerPos.transform.eulerAngles.y);
            introEventStart = true;
        }
        else
        {
            //
            RenderSettings.fog = true;
            GameController.instance.DefMusic();
            GameController.instance.DefaultAmbiance();
            GameController.instance.StopTimer  = true;
            GameController.instance.doGameplay = true;
            GameController.instance.canSave    = true;
            GameController.instance.CullerFlag = true;
            Destroy(introZone);
            if (!SaveSystem.instance.playData.worldsCreateds[(int)GameController.instance.worldName])
            {
                GameController.instance.SetMapPos(0, 10);
            }
            DestroyImmediate(this);
        }

        Guard1_con = Guard1.GetComponent <EV_Puppet_Controller>();
        Guard2_con = Guard2.GetComponent <EV_Puppet_Controller>();
        playerHead = Camera.main.transform;
        Player     = GameController.instance.player;
        Timer      = 5;

        if (GlobalValues.mapseed.Contains("IntroConvo"))
        {
            AsyncScene_1();
            Door1.GetComponent <Object_Door>().DoorSwitch();
            ActiveTimer = false;
        }
    }
    // Start is called before the first frame update
    void Start()
    {
        Guard1_ = Guard1.GetComponent <EV_Puppet_Controller>();
        Guard2_ = Guard2.GetComponent <EV_Puppet_Controller>();
        D1_     = D1.GetComponent <EV_Puppet_Controller>();
        Sci1_   = Sci1.GetComponent <EV_Puppet_Controller>();
        Sci2_   = Sci2.GetComponent <EV_Puppet_Controller>();
        Jan_    = Jan.GetComponent <EV_Puppet_Controller>();

        int Group    = Random.Range(0, 3);
        int LineOrGo = Random.Range(0, 2);

        RandOrScript = Random.Range(0, 2);
        if (LineOrGo == 0)
        {
            FinalMessage = new AudioClip[6];
        }
        else
        {
            FinalMessage = new AudioClip[7];
        }

        FinalMessage[1] = DIA1[Random.Range(0, DIA1.Length)];

        if (Group == 0)
        {
            FinalMessage[2] = SCI_1[Random.Range(0, SCI_1.Length)];
        }
        if (Group == 1)
        {
            FinalMessage[2] = CRE_1[Random.Range(0, CRE_1.Length)];
        }
        if (Group == 2)
        {
            FinalMessage[2] = SEC_1[Random.Range(0, SEC_1.Length)];
        }

        if (LineOrGo == 0)
        {
            FinalMessage[3] = NUMBERS[9];
            FinalMessage[4] = NUMBERS[Random.Range(0, NUMBERS.Length - 1)];
            FinalMessage[5] = ONOFF[1];
        }
        else
        {
            FinalMessage[6] = ONOFF[1];

            FinalMessage[3] = DIA2[Random.Range(0, DIA2.Length)];

            if (Group == 0)
            {
                FinalMessage[4] = SCI_2[Random.Range(0, SCI_2.Length)];
            }
            if (Group == 1)
            {
                FinalMessage[4] = CRE_2[Random.Range(0, CRE_2.Length)];
            }
            if (Group == 2)
            {
                FinalMessage[4] = SEC_2[Random.Range(0, SEC_2.Length)];
            }

            if (Group == 0)
            {
                FinalMessage[5] = SCI_3[Random.Range(0, SCI_3.Length)];
            }
            if (Group == 1)
            {
                FinalMessage[5] = CRE_3[Random.Range(0, CRE_3.Length)];
            }
            if (Group == 2)
            {
                FinalMessage[5] = SEC_3[Random.Range(0, SEC_3.Length)];
            }
        }

        FinalMessage[0] = ONOFF[0];
    }
 // Update is called once per frame
 private void Awake()
 {
     Sci_ = Sci.GetComponent <EV_Puppet_Controller>();
     Gua_ = Gua.GetComponent <EV_Puppet_Controller>();
 }