public void Play() { bool start = GameObject.FindGameObjectWithTag("Player").GetComponent <Robot>().played; GameObject.FindGameObjectWithTag("Player").GetComponent <Robot>().played = !start; anim.SetBool("Played", !start); //ustawieni przycisku play if (!start) { EventSystem.current.currentSelectedGameObject.GetComponent <Image>().sprite = stop; } else { EventSystem.current.currentSelectedGameObject.GetComponent <Image>().sprite = play; //restart pozycji gracza GM.instance.RestartPlayer(); } // wylaczanie elementów interfejsu UI_listaObiektow.SetActive(false); UI_listaCzynnosci.SetActive(false); UI_bloki.SetActive(false); UI_czujniki[aktulaneUsta].SetActive(false); }
public void CzujnikUstawien(int i) { if (UI_czujniki[i] == null) { GameObject a = (GameObject)Instantiate(UI_czujnikPrefab, gameObject.transform.position, Quaternion.identity, gameObject.transform); UI_czujniki[i] = a; } else { if (aktulaneUsta != i) { UI_czujniki[aktulaneUsta].SetActive(false); } UI_czujniki[i].SetActive(!UI_czujniki[i].activeSelf); } UI_bloki.SetActive(false); aktulaneUsta = i; wybCzuj = EventSystem.current.currentSelectedGameObject; UI_listaObiektow.SetActive(false); UI_listaCzynnosci.SetActive(false); }
public void ListaCzy() { UI_listaObiektow.SetActive(false); UI_listaCzynnosci.SetActive(!UI_listaObiektow.activeSelf); }