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

        ConfigureResolutions();
    }
コード例 #5
0
 void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume();
     difficultySlider.value = PlayerPrefsController.GetDifficulty();
     Debug.Log(difficultySlider.value);
 }
コード例 #6
0
 void Start()
 {
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
コード例 #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
 }
コード例 #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();
 }
コード例 #9
0
 private void Start()
 {
     // Sound
     AudioSource.PlayClipAtPoint(sounds.GetClip(0), transform.localPosition, PlayerPrefsController.GetMasterVolume());
 }
コード例 #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
 }
コード例 #11
0
    // Start is called before the first frame update
    void Start()
    {
        var startVolume = PlayerPrefsController.GetMasterVolume();

        volumeSlider.value = (startVolume != 0) ? startVolume : defaultVolume;
    }
コード例 #12
0
ファイル: Test.cs プロジェクト: Virunee/Glitch-Garden
 // Start is called before the first frame update
 void Start()
 {
     PlayerPrefsController.SetMasterVolume(0.4f);
     Debug.Log("volume returns: " + PlayerPrefsController.GetMasterVolume());
 }
コード例 #13
0
 // Update is called once per frame
 void Update()
 {
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
コード例 #14
0
 private void Start()
 {
     Debug.Log(GetInstanceID() + ": OptionsController is attached to: "
               + volumeSlider.name + " with ID: " + volumeSlider.GetInstanceID());
     volumeSlider.value = PlayerPrefsController.GetMasterVolume();
 }
コード例 #15
0
 // Use this for initialization
 void Start()
 {
     volumeSlider.value     = PlayerPrefsController.GetMasterVolume(defaultVolume);
     difficultySlider.value = PlayerPrefsController.GetDifficulty(defaultDifficulty);
 }
コード例 #16
0
ファイル: TEST.cs プロジェクト: RudolfsP/Tower-Defense
    // Start is called before the first frame update
    void Start()
    {
        PlayerPrefsController.SetMasterVolume(0.4f);

        PlayerPrefsController.GetMasterVolume();
    }
コード例 #17
0
 private void Awake()
 {
     Singleton();
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
コード例 #18
0
ファイル: MusicPlayer.cs プロジェクト: Necr0e/GardenDefender
 private void Start()
 {
     DontDestroyOnLoad(this);
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
コード例 #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
 }
コード例 #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();
 }
コード例 #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
 }
コード例 #22
0
 private void Update()
 {
     UpdateVolume(PlayerPrefsController.GetMasterVolume());
 }
コード例 #23
0
 // Start is called before the first frame update
 void Start()
 {
     volumeSlider.value = PlayerPrefsController.GetMasterVolume();
 }
コード例 #24
0
 // Start is called before the first frame update
 void Start()
 {
     music        = GetComponent <AudioSource>();
     music.volume = PlayerPrefsController.GetMasterVolume();
 }
コード例 #25
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerPrefsController.SetMasterVolume(0.4f);
     Debug.Log("Returned value of " + PlayerPrefsController.GetMasterVolume());
 }
コード例 #26
0
 private void Awake()
 {
     difficultySlider.value   = PlayerPrefsController.GetDifficulty();
     masterVolumeSlider.value = PlayerPrefsController.GetMasterVolume();
     soundEffectsSlider.value = PlayerPrefsController.GetEffectsVolume();
 }
コード例 #27
0
 // Start is called before the first frame update
 void Start()
 {
     PlayerPrefsController.SetMasterVolume(0.4f);
     Debug.Log(PlayerPrefsController.GetMasterVolume());
 }
コード例 #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());
            }
        }
    }
コード例 #29
0
 void Start()
 {
     DontDestroyOnLoad(this);
     audioSource        = GetComponent <AudioSource>();
     audioSource.volume = PlayerPrefsController.GetMasterVolume();
 }
コード例 #30
0
 void Start()
 {
     volumeSlider.value      = PlayerPrefsController.GetMasterVolume();
     levelLengthSlider.value = PlayerPrefsController.GetMasterLength();
 }