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

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

        PlayerPrefsController.GetMasterVolume();
    }
Ejemplo n.º 17
0
 private void Awake()
 {
     Singleton();
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Ejemplo n.º 18
0
 private void Start()
 {
     DontDestroyOnLoad(this);
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Ejemplo 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
 }
Ejemplo 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();
 }
Ejemplo 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
 }
Ejemplo n.º 22
0
 private void Update()
 {
     UpdateVolume(PlayerPrefsController.GetMasterVolume());
 }
Ejemplo 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();
 }
Ejemplo n.º 25
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerPrefsController.SetMasterVolume(0.4f);
     Debug.Log("Returned value of " + PlayerPrefsController.GetMasterVolume());
 }
Ejemplo n.º 26
0
 private void Awake()
 {
     difficultySlider.value   = PlayerPrefsController.GetDifficulty();
     masterVolumeSlider.value = PlayerPrefsController.GetMasterVolume();
     soundEffectsSlider.value = PlayerPrefsController.GetEffectsVolume();
 }
Ejemplo n.º 27
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerPrefsController.SetMasterVolume(0.4f);
     Debug.Log(PlayerPrefsController.GetMasterVolume());
 }
Ejemplo 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());
            }
        }
    }
Ejemplo n.º 29
0
 void Start()
 {
     DontDestroyOnLoad(this);
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
Ejemplo n.º 30
0
 void Start()
 {
     volumeSlider.value      = PlayerPrefsController.GetMasterVolume();
     levelLengthSlider.value = PlayerPrefsController.GetMasterLength();
 }