Пример #1
0
 private void Start()
 {
     gameSettings = GameSettingsManager.instance;
     SetVrToggleText();
     sensitivity = gameSettings.GetSensitivity();
     SetSensitivityText();
 }
Пример #2
0
        private void Initialise()
        {
            GameSettingsManager gs = GameSettingsManager.instance;

            normalCamera.SetActive(!gs.vrMode());
            VRCamera.SetActive(gs.vrMode());
            cameraToUse = gs.vrMode() ? VRCamera : normalCamera;
            sensitivity = gs.GetSensitivity();

            ShipData shipData = ShopManager.instance.GetSelectedShipData();

            shipModel    = GameObject.FindGameObjectWithTag(shipData.GetShipName()).transform;
            speed        = shipData.GetSpeed();
            acceleration = shipData.GetAcceleration();
            turningSpeed = shipData.GetTurningSpeed();

            foreach (Transform model in shipModels)
            {
                model.gameObject.SetActive(model.tag.Equals(shipData.GetShipName()));
            }

            hud = GetComponent <PlayerHud>();
            hud.SetSpeedText(speed);
            startingYPosition = transform.position.y;
        }
Пример #3
0
 public IEnumerator GameSettingsManagerStartsWithDefaultSensitivityOfFive()
 {
     Assert.AreEqual(5f, manager.GetSensitivity());
     yield return(new WaitForSeconds(WAIT_TIME));
 }