예제 #1
0
    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;
        }
    }
예제 #2
0
    public void Initialize()
    {
        HP1.Initialise();
        HP2.Initialise();

        HP1.HPScale     = new Vector3(1, 1, 1);
        HP1.DamageScale = new Vector3(1, 1, 1);
        HP2.HPScale     = new Vector3(1, 1, 1);
        HP2.DamageScale = new Vector3(1, 1, 1);

        Guard1.Initialise();
        Guard2.Initialise();

        player1.transform.position = initPos1;
        player2.transform.position = initPos2;

        player1Controller.CanControll = false;
        player2Controller.CanControll = false;

        player1Controller.Direction = 1;
        player2Controller.Direction = 2;

        //comboScript.NoneCombo();
    }
    // 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];
    }