private void Awake()
 {
     PlayerPrefsSystem.LoadAudioConfig(this);
     masterSlider.value = masterVolume;
     sfxSlider.value    = sfxVolume;
     musicSlider.value  = musicVolume;
 }
Example #2
0
 public void UnlockNextButton(int nextLevel)
 {
     if (UnlockedLevels < nextLevel)
     {
         UnlockedLevels = nextLevel;
     }
     PlayerPrefsSystem.SaveLevelProgress(this);
 }
Example #3
0
 void OnTriggerEnter2D(Collider2D col)
 {
     if (col.CompareTag("Player")){
         player.canMove = false;
         player.Flip();
         player.rb.velocity = new Vector2(0f, 0f);
         player.velocity = 0;
         pontosScript.ShowLevelComplete();
         mg.checkPoint = mg.transform.position;
         PlayerPrefsSystem.SaveLvlPontuation(levelID,pontosScript.points);
         PlayerPrefsSystem.UnlockLevel(levelID + 1);
         Time.timeScale = 1f;
     }
 }
Example #4
0
 private void Awake()
 {
     PlayerPrefsSystem.LoadLevelProgress(this);
     for (int i = 0; i < stars.Length; i++)
     {
         if (points >= pointLimit[i])
         {
             stars[i].color = withColor;
         }
         if (points < pointLimit[i])
         {
             stars[i].color = noColor;
         }
     }
 }
Example #5
0
 private void Start()
 {
     lvlManager = FindObjectOfType <LevelManager>();
     PlayerPrefsSystem.LoadLevelProgress(this);
     if (UnlockedLevels < 3)
     {
         worldAnim[0].gameObject.SetActive(true);
     }
     if (UnlockedLevels >= 3 && UnlockedLevels < 6)
     {
         worldAnim[1].gameObject.SetActive(true);
     }
     if (UnlockedLevels >= 6 && UnlockedLevels < 9)
     {
         worldAnim[2].gameObject.SetActive(true);
     }
     if (UnlockedLevels >= 10 && UnlockedLevels < 12)
     {
         worldAnim[3].gameObject.SetActive(true);
     }
 }
 public void ChangeSFXVolume(float value)
 {
     sfxVolume = value;
     PlayerPrefsSystem.SaveAudioConfig(this);
 }
 public void ChangeMusicVolume(float value)
 {
     musicVolume = value;
     PlayerPrefsSystem.SaveAudioConfig(this);
 }