Esempio n. 1
0
    private void Start()
    {
        UpdateProgressBar(0, "Player");
        tutorial = GameObject.FindObjectOfType <TutorialController> ();
        game     = GameObject.FindObjectOfType <GameController> ();
        gameOver = GameObject.FindObjectOfType <GameOver> ();

        anim = GetComponent <Animator> ();
        volumeSlider.value = PlayerPrefController.GetVolume();
    }
Esempio n. 2
0
    public void SetVolume(float volume)
    {
        PlayerPrefController.SetVolume(volume);
        mainTrack.volume = PlayerPrefController.GetVolume();

        if (volume == 0)
        {
            GameObject.Find("VolumeImage").GetComponent <Image> ().sprite = audioOffSprite;
        }
        else
        {
            GameObject.Find("VolumeImage").GetComponent <Image> ().sprite = audioOnSprite;
        }
    }
Esempio n. 3
0
    void Start()
    {
        instructionPage = 1;

        if (SceneManager.GetActiveScene().name == "MainLevel")
        {
            quitButton.SetActive(true);
        }
        else
        {
            quitButton.SetActive(false);
        }

        volumeSlider.value = PlayerPrefController.GetVolume();
    }
Esempio n. 4
0
    private void Start()
    {
        volumeMute       = false;
        versionText.text = "v" + Application.version;
        turnMultiplier   = 20;

        volumeSlider.value     = PlayerPrefController.GetVolume();
        difficultySlider.value = PlayerPrefController.GetDifficultyLevel();
        turnsSlider.value      = PlayerPrefController.GetTurnLimit() / turnMultiplier;
        if (PlayerPrefController.GetTutorialToggle() != 1)
        {
            tutorialToggle.isOn = false;
        }
        else
        {
            tutorialToggle.isOn = true;
        }
    }
Esempio n. 5
0
    private void TriggerVoiceMessage()
    {
        AudioClip clipToPlay = voiceClips [clipIndex];

        volumeBeforeVoiceClip = PlayerPrefController.GetVolume();
        optionsController.volumeSlider.value = 0.05f;


        AudioSource.PlayClipAtPoint(clipToPlay, transform.position, 1f);

        if (clipIndex == 0)
        {
            clipIndex = 1;
        }
        else
        {
            clipIndex = 0;
        }
    }
Esempio n. 6
0
 void Start()
 {
     AudioListener.volume = 0.35f;
     mainTrack.volume     = PlayerPrefController.GetVolume();
 }