Пример #1
0
    private void LoadEnv()
    {
        _packedEnv = Instantiate(envPrefabs[PresentationData.in_EnvType]);

        inputManager.player         = _packedEnv.transform.GetComponentInChildren <SlidesPlayer>();
        inputManager.OnPracticeEnd += EndPractice;
        inputManager.OnExitVRScene += ExitEnv;

        timer = _packedEnv.transform.GetComponentInChildren <ClockTimer>();
        timer.SetMaxTime((int)PresentationData.in_ExpectedTime);

        crowdSim.crowdConfigFileName = EnvInfoDict[PresentationData.in_EnvType].crowdConfigPath;
        crowdSim.crowdParent         = _packedEnv.transform.Find("CrowdParentTransform");
        recordWrapper.debugText      = _packedEnv.transform.Find("RecordDebugText").GetComponent <TextMesh>();
        slidesPlayer           = _packedEnv.transform.GetComponentInChildren <SlidesPlayer>();
        audioManager.room      = _packedEnv.transform.GetComponentInChildren <CardboardAudioRoom>();
        audioManager.miscBound = _packedEnv.transform.GetComponentInChildren <AudioBound>();
        //tutManager.slidePlayer = inputManager.GetComponent<SlidesPlayer>();
        //tutManager.timerPlayer = env.transform.GetComponentInChildren<clockTimer>();
    }