void OnGUI() { if (czyWyswietlicEkwipunek) { ekwipunekObiekt.WyświetlEkwipunek(1, "Gracza"); } if (czyHandel) { ekwipunekObiekt.WyświetlEkwipunek(2, "Gracza"); } if (czyWyswietlicCelownik) { //wyswietlanie "celownika" GUI.DrawTexture(new Rect((Screen.width * 0.5f) - (tCelownik.width * 0.5f), (Screen.height * 0.5f) - (tCelownik.height * 0.5f) - 15, tCelownik.width, tCelownik.height), tCelownik); } }
void OnGUI() { if (AktywnaRozmowa) { GUI.Box(new Rect(Screen.width / 2, Screen.height / 2 + 100, 50, 25), Imie); GUI.Box(new Rect(50, Screen.height / 2 + 150, Screen.width - 100, 50), Wiadomosc); for (int x = 0; x < blok.OpcjeWyboru.Count; x++) { if (x != AktywnyWybor) { //GUI.Box(new Rect(Screen.width / 2 + 75, Screen.height / 2 - 30 + x * 30, 200, 25), "Opcja " + x.ToString()); GUI.Box(new Rect(Screen.width / 2 + 75, Screen.height / 2 - 30 + x * 30, 250, 25), blok.OpcjeWyboru[x].ToString()); } else { GUI.DrawTexture(new Rect(Screen.width / 2 + 75, Screen.height / 2 - 30 + x * 30, 250, 25), BialeTlo); GUI.Box(new Rect(Screen.width / 2 + 75, Screen.height / 2 - 30 + x * 30, 250, 25), blok.OpcjeWyboru[x].ToString()); //GUI.Label(new Rect(Screen.width / 2 + 75, Screen.height / 2 - 30 + x * 30, 200, 25), x.ToString()); //GUI.Box (new Rect(Screen.width / 2 + 75, Screen.height / 2 - 30 + x * 30, 200, 25), new GUIContent(x.ToString(), BialeTlo));//do wykorzystania jeżeli ma byc ikona symbolizujaca handel jak w MD //GUI.Box(new Rect(Screen.width / 2 + 75, Screen.height / 2 - 30 + x * 30, 200, 25), x.ToString()); } } if (AktywnyHandel) { ekwipunekObiekt.WyświetlEkwipunek(3, Imie); } } }