private void AwakeFunctions()
 {
     DontDestroyOnLoad(this);
     music        = GetComponent <AudioSource>();
     music.volume = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 2
0
 // Start is called before the first frame update
 void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume();
     difficultySlider.value = PlayerPrefsController.GetDifficulty();
     musicPlayer            = FindObjectOfType <MusicPlayer>();
 }
Esempio n. 3
0
 private void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume();
     difficultySlider.value = PlayerPrefsController.GetDifficulty();
 }
Esempio n. 4
0
    // Start is called before the first frame update
    void Start()
    {
        volueSlider.value = PlayerPrefsController.GetMasterVolume();

        ConfigureResolutions();
    }
 void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume();
     difficultySlider.value = PlayerPrefsController.GetDifficulty();
     Debug.Log(difficultySlider.value);
 }
 void Start()
 {
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 7
0
 // Start is called before the first frame update
 void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume(); //Grabs master volume pref float
     difficultySlider.value = PlayerPrefsController.GetDifficulty();   //Grabs difficulty pref float value
 }
Esempio n. 8
0
 // Start is called before the first frame update
 void Start()
 {
     DontDestroyOnLoad(this);  //this being the particular gameobject this script is on
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 9
0
 private void Start()
 {
     // Sound
     AudioSource.PlayClipAtPoint(sounds.GetClip(0), transform.localPosition, PlayerPrefsController.GetMasterVolume());
 }
Esempio n. 10
0
 // Start is called before the first frame update
 void Start()
 {
     volumeSlider.value = PlayerPrefsController.GetMasterVolume();   //accesing the slider value
     //and assigning it to prefs
     difficultySlider.value = PlayerPrefsController.GetDifficulty(); //same here with difficulty
 }
Esempio n. 11
0
    // Start is called before the first frame update
    void Start()
    {
        var startVolume = PlayerPrefsController.GetMasterVolume();

        volumeSlider.value = (startVolume != 0) ? startVolume : defaultVolume;
    }
Esempio n. 12
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerPrefsController.SetMasterVolume(0.4f);
     Debug.Log("volume returns: " + PlayerPrefsController.GetMasterVolume());
 }
 // Update is called once per frame
 void Update()
 {
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 14
0
 private void Start()
 {
     Debug.Log(GetInstanceID() + ": OptionsController is attached to: "
               + volumeSlider.name + " with ID: " + volumeSlider.GetInstanceID());
     volumeSlider.value = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 15
0
 // Use this for initialization
 void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume(defaultVolume);
     difficultySlider.value = PlayerPrefsController.GetDifficulty(defaultDifficulty);
 }
Esempio n. 16
0
    // Start is called before the first frame update
    void Start()
    {
        PlayerPrefsController.SetMasterVolume(0.4f);

        PlayerPrefsController.GetMasterVolume();
    }
Esempio n. 17
0
 private void Awake()
 {
     Singleton();
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 18
0
 private void Start()
 {
     DontDestroyOnLoad(this);
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 19
0
 // Start is called before the first frame update
 void Start()
 {
     DontDestroyOnLoad(this);
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();//music should be at whatever the music volume is
 }
Esempio n. 20
0
 // Start is called before the first frame update
 void Start()
 {
     DontDestroyOnLoad(this); //keep the background music player for all levels
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 21
0
 // Start is called before the first frame update
 void Start()
 {
     DontDestroyOnLoad(gameObject);
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume(); //We are grabbing our static function
 }
Esempio n. 22
0
 private void Update()
 {
     UpdateVolume(PlayerPrefsController.GetMasterVolume());
 }
Esempio n. 23
0
 // Start is called before the first frame update
 void Start()
 {
     volumeSlider.value = PlayerPrefsController.GetMasterVolume();
 }
 // Start is called before the first frame update
 void Start()
 {
     music        = GetComponent <AudioSource>();
     music.volume = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 25
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerPrefsController.SetMasterVolume(0.4f);
     Debug.Log("Returned value of " + PlayerPrefsController.GetMasterVolume());
 }
 private void Awake()
 {
     difficultySlider.value   = PlayerPrefsController.GetDifficulty();
     masterVolumeSlider.value = PlayerPrefsController.GetMasterVolume();
     soundEffectsSlider.value = PlayerPrefsController.GetEffectsVolume();
 }
Esempio n. 27
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerPrefsController.SetMasterVolume(0.4f);
     Debug.Log(PlayerPrefsController.GetMasterVolume());
 }
Esempio n. 28
0
    private void AttemptToPlaceDefenderAt(Vector2 worldPos)
    {
        // Get the stars cost
        int defenderCost = defenderPrefab.GetStarCost();

        // Do I have enough stars to buy the defender?
        if (StarDisplay.HaveEnoughStars(defenderCost))
        {
            // Place in the grid to place the defender
            Vector2 spawnPos = SnapToGrid(worldPos);

            // Are there no enemies in the square?
            if (IsAreaCleanOfEnemies(spawnPos))
            {
                // Subtract the cost and Spawn
                StarDisplay.SpendStars(defenderCost);
                SpawnDefender(spawnPos);

                //Sound
                AudioSource.PlayClipAtPoint(sounds.GetClip(0), transform.localPosition, PlayerPrefsController.GetMasterVolume());
            }
        }
    }
Esempio n. 29
0
 void Start()
 {
     DontDestroyOnLoad(this);
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Esempio n. 30
0
 void Start()
 {
     volumeSlider.value      = PlayerPrefsController.GetMasterVolume();
     levelLengthSlider.value = PlayerPrefsController.GetMasterLength();
 }