private void AwakeFunctions()
 {
     DontDestroyOnLoad(this);
     music        = GetComponent <AudioSource>();
     music.volume = PlayerPrefsController.GetMasterVolume();
 }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume();
     difficultySlider.value = PlayerPrefsController.GetDifficulty();
     musicPlayer            = FindObjectOfType <MusicPlayer>();
 }
Exemple #3
0
 private void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume();
     difficultySlider.value = PlayerPrefsController.GetDifficulty();
 }
Exemple #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();
 }
Exemple #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
 }
Exemple #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();
 }
Exemple #9
0
 private void Start()
 {
     // Sound
     AudioSource.PlayClipAtPoint(sounds.GetClip(0), transform.localPosition, PlayerPrefsController.GetMasterVolume());
 }
Exemple #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
 }
Exemple #11
0
    // Start is called before the first frame update
    void Start()
    {
        var startVolume = PlayerPrefsController.GetMasterVolume();

        volumeSlider.value = (startVolume != 0) ? startVolume : defaultVolume;
    }
Exemple #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();
 }
Exemple #14
0
 private void Start()
 {
     Debug.Log(GetInstanceID() + ": OptionsController is attached to: "
               + volumeSlider.name + " with ID: " + volumeSlider.GetInstanceID());
     volumeSlider.value = PlayerPrefsController.GetMasterVolume();
 }
 // Use this for initialization
 void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume(defaultVolume);
     difficultySlider.value = PlayerPrefsController.GetDifficulty(defaultDifficulty);
 }
Exemple #16
0
    // Start is called before the first frame update
    void Start()
    {
        PlayerPrefsController.SetMasterVolume(0.4f);

        PlayerPrefsController.GetMasterVolume();
    }
Exemple #17
0
 private void Awake()
 {
     Singleton();
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Exemple #18
0
 private void Start()
 {
     DontDestroyOnLoad(this);
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Exemple #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
 }
Exemple #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();
 }
Exemple #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
 }
Exemple #22
0
 private void Update()
 {
     UpdateVolume(PlayerPrefsController.GetMasterVolume());
 }
 // 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();
 }
 // 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();
 }
Exemple #27
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerPrefsController.SetMasterVolume(0.4f);
     Debug.Log(PlayerPrefsController.GetMasterVolume());
 }
Exemple #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());
            }
        }
    }
 void Start()
 {
     DontDestroyOnLoad(this);
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
 void Start()
 {
     volumeSlider.value      = PlayerPrefsController.GetMasterVolume();
     levelLengthSlider.value = PlayerPrefsController.GetMasterLength();
 }