示例#1
0
        private void Awake()
        {
            player = _player;

            fadein = _fadeIn;
            fadein.GetComponent <Image>().color = new Color(0, 0, 0, 1); // black, no transparency
            instructionsText       = fadein.GetComponentsInChildren <TextMeshProUGUI>()[0];
            instructionsText.color = new Color(1, 1, 1, 0);              // white, transparent
            thanksText             = fadein.GetComponentsInChildren <TextMeshProUGUI>()[1];
            thanksText.color       = new Color(1, 1, 1, 0);              // white, transparent
            quitText       = thanksText.gameObject.GetComponentsInChildren <TextMeshProUGUI>()[1];
            quitText.color = new Color(1, 1, 1, 0);                      // white, transparent

            camera     = Camera.main;
            tiltCamera = _tiltCamera;

            rtWaypoint = ringToss;
            tsWaypoint = tiltShrine;

            waypointCount = 2;

            osc                   = forceBar.GetComponent <Oscillator2>();
            staticGoals           = goals;
            staticTiltShrineSetUp = tiltShrineSetUp;
            staticArenas          = arenas;
            activeArena           = staticArenas[arenaIndex];
            arenaIndex++;

            finishGameCollider = finishCollider;

            pauseCanvas    = _pauseCanvas;
            quitGameButton = _quitGameButton;
            quitGameButton.onClick.AddListener(Quit);
            timeSlider = pauseCanvas.GetComponentInChildren <AdjustTimeScale>();

            optionsCanvas = _optionsCanvas;
            sensSlider    = optionsCanvas.GetComponentInChildren <AdjustSensitivity>();
        }
示例#2
0
 private void Awake()
 {
     osc = GameObject.FindGameObjectWithTag("Force Bar").GetComponent <Oscillator2>();
 }