Ustawienia settings; // ustawienia dźwięku, muzyki i odgrywanie dźwięków // Use this for initialization void Start() { settings = GameObject.FindWithTag("Ustawienia").GetComponent <Ustawienia> (); gAnim = GetComponent <Animator> (); newRecordAnim = GameObject.Find("NewRecordText").GetComponent <Animator> (); myRigidbody = GetComponent <Rigidbody2D>(); crowd = GameObject.FindGameObjectWithTag("Tlum").GetComponent <Transform>(); scoreValue = 0f; //zerowanie wyniku settings.wlaczMuzyke(gameMusic); highscoreText.text = "Rekord: " + PlayerPrefs.GetInt("Highscore"); if (!PlayerPrefs.HasKey("Money")) { PlayerPrefs.SetInt("Money", 0); } for (int i = 0; i < upgrades.upgradesArray.Length; i++) { if (PlayerPrefs.GetInt(upgrades.upgradesArray [i].name) == 0) { upgradeEnabled [i] = false; if (upgrades.upgradesArray [i].upgradeImage != null) { upgrades.upgradesArray [i].upgradeImage.gameObject.SetActive(false); } } else { upgradeEnabled [i] = true; } } }
// Use this for initialization void Start() { ust = GameObject.Find("Ustawienia").GetComponent <Ustawienia> (); textDzwiek = GameObject.Find("SoundButton").GetComponentInChildren <Text> (); textMuzyka = GameObject.Find("MusicButton").GetComponentInChildren <Text> (); ust.wlaczMuzyke(menuMusic); clicks = 0; if (!PlayerPrefs.HasKey("Points")) // Ustawianie zmiennej odpowiedzialnej za ogólne punkty { PlayerPrefs.SetInt("Points", 0); } if (!PlayerPrefs.HasKey("FirstTime")) // Sprawdzanie, czy gra została włączona po raz pierwszy na urządzeniu { PlayerPrefs.SetInt("FirstTime", 1); } else { PlayerPrefs.SetInt("FirstTime", 0); } if (PlayerPrefs.GetInt("Dzwiek") == 0) // Ustawianie tekstu na przycisku dźwięku { textDzwiek.text = "DŹWIĘK: OFF"; } if (PlayerPrefs.GetInt("Muzyka") == 0) // Ustawianie tekstu na przycisku muzyki { textMuzyka.text = "MUZYKA: OFF"; } }
private void ZapiszUstawienia() { try { Ustawienia.Zapisz(); } catch (Exception ex) { dialog.ShowError(ex); log.Error(ex); throw ex; } }
public EdycjaKoloru2() { Kolor kolor = Ustawienia.Czytaj(); R = kolor.R; G = kolor.G; B = kolor.B; }
public MainWindow() { InitializeComponent(); Color kolor = Ustawienia.Czytaj().ToColor(); rectangle.Fill = new SolidColorBrush(kolor); sliderR.Value = kolor.R; sliderG.Value = kolor.G; sliderB.Value = kolor.B; }
public MainWindow() { InitializeComponent(); Ustawienia.ZresetujUstawieniaZapytan(); statusBarText.Text = "Ilość możliwych zapytań: " + Ustawienia.PobierzIloscMozliwychZapytan().ToString(); mainTextBox.Text = @"Ikony pobrane z strony: https://freeicons.io/regular-life-icons/ Grzegorz Banasiak 2019 Licencja MIT Program korzysta z otwartego API - Biała Lista"; }
public void Zapisz() { Ustawienia.Zapisz(kolor); }
public void Zapisz() { Kolor kolor = new Kolor(R, G, B); Ustawienia.Zapisz(kolor); }
// Use this for initialization void Start() { gameCanvas.SetActive(false); ust = GameObject.Find("Ustawienia").GetComponent <Ustawienia> (); }
// Use this for initialization void Start() { ust = GameObject.FindWithTag("Ustawienia").GetComponent <Ustawienia> (); player = GameObject.FindWithTag("Player").GetComponent <PlayerMovement> (); StartCoroutine(spawner()); }
public Text highscoreText; //tekst z najlepszym wynikiem void Start() { settings = GameObject.FindWithTag("Ustawienia").GetComponent <Ustawienia> (); player = GameObject.FindWithTag("Player").GetComponent <PlayerMovement> (); }
private void Window_Closed(object sender, EventArgs e) { Ustawienia.Zapisz(new Kolor(KolorProstokąta.R, KolorProstokąta.G, KolorProstokąta.B)); }
public tipsTextStruct[] tipsTexts; //Tablica powyższych struktur void Start() { ust = GameObject.Find("Ustawienia").GetComponent <Ustawienia> (); fAnim = GetComponent <Animator> (); tip = GetComponentInChildren <Text> (); }
void resetSound() { ust = GameObject.Find("Ustawienia").GetComponent <Ustawienia> (); ust.resetSound(); }
// Use this for initialization void Start() { settings = GameObject.FindWithTag("Ustawienia").GetComponent <Ustawienia> (); }
private void Window_Closed(object sender, EventArgs e) { Ustawienia.Zapisz(KolorProstokata); }