示例#1
0
    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;
            }
        }
    }
示例#2
0
    // 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";
        }
    }
示例#3
0
 private void ZapiszUstawienia()
 {
     try
     {
         Ustawienia.Zapisz();
     }
     catch (Exception ex) { dialog.ShowError(ex); log.Error(ex); throw ex; }
 }
示例#4
0
        public EdycjaKoloru2()
        {
            Kolor kolor = Ustawienia.Czytaj();

            R = kolor.R;
            G = kolor.G;
            B = kolor.B;
        }
示例#5
0
        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;
        }
示例#6
0
        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";
        }
示例#7
0
 public void Zapisz()
 {
     Ustawienia.Zapisz(kolor);
 }
示例#8
0
        public void Zapisz()
        {
            Kolor kolor = new Kolor(R, G, B);

            Ustawienia.Zapisz(kolor);
        }
示例#9
0
 // 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());
 }
示例#11
0
    public Text highscoreText;          //tekst z najlepszym wynikiem

    void Start()
    {
        settings = GameObject.FindWithTag("Ustawienia").GetComponent <Ustawienia> ();
        player   = GameObject.FindWithTag("Player").GetComponent <PlayerMovement> ();
    }
示例#12
0
 private void Window_Closed(object sender, EventArgs e)
 {
     Ustawienia.Zapisz(new Kolor(KolorProstokąta.R, KolorProstokąta.G, KolorProstokąta.B));
 }
示例#13
0
    public tipsTextStruct[] tipsTexts;          //Tablica powyższych struktur

    void Start()
    {
        ust   = GameObject.Find("Ustawienia").GetComponent <Ustawienia> ();
        fAnim = GetComponent <Animator> ();
        tip   = GetComponentInChildren <Text> ();
    }
示例#14
0
 void resetSound()
 {
     ust = GameObject.Find("Ustawienia").GetComponent <Ustawienia> ();
     ust.resetSound();
 }
示例#15
0
 // Use this for initialization
 void Start()
 {
     settings = GameObject.FindWithTag("Ustawienia").GetComponent <Ustawienia> ();
 }
示例#16
0
 private void Window_Closed(object sender, EventArgs e)
 {
     Ustawienia.Zapisz(KolorProstokata);
 }