void OnGUI() { OperationsWithGameObject.LightObject(gameObject, chosenGameObject); if (isShowDialogActiveObject) { int xc = Screen.width / 2; int yc = Screen.height / 2; int dx = 800; int dy = 500; GUI.Window(1, new Rect(xc - dx / 2, yc - dy / 2, dx, dy), CreateDialogActiveObject, "Варианты действия с выбранным объектом"); } //if (chosenGameObject == gameObject) //{ // if (open) // { // GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 100, 300, 30), "Нажмите 'F', чтобы выключить" + gameObject.name); // } // else // { // GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 70, 300, 30), "Нажмите 'F', чтобы включить" + gameObject.name); // } //} }
virtual protected void OnGUI() { if (!isActiveLite) { return; } OperationsWithGameObject.LightObject(gameObject, chosenGameObject); }
void OnGUI() { OperationsWithGameObject.LightObject(gameObject, chosenGameObject); //OperationsWithGameObject.LightObject(gameObject.transform.parent.gameObject, chosenGameObject.transform.parent.gameObject); if (chosenGameObject == gameObject) { //if(gameObjectForOpen != null) GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 200, 200, 30), gameObjectForOpen.name); //{ // GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 180, 200, 30), open.ToString()); //} //if (open) //{ // GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 70, 300, 30), "Нажмите 'F', чтобы выключить: " + gameObject.transform.GetChild(0).gameObject.name); //} //else //{ // GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 70, 300, 30), "Нажмите 'F', чтобы включить: " + gameObject.transform.GetChild(0).gameObject.name); //} } }
void OnGUI() { OperationsWithGameObject.LightObject(gameObject, gameObjectForOpen); if (gameObjectForOpen == gameObject) { //if(gameObjectForOpen != null) GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 200, 200, 30), gameObjectForOpen.name); //{ // GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 180, 200, 30), open.ToString()); //} //if (open) //{ // GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 100, 300, 30), "Нажмите 'F', чтобы закрыть дверь"); //} //else //{ // GUI.Label(new Rect(Screen.width / 2 - 75, Screen.height - 70, 300, 30), "Нажмите 'F', чтобы открыть дверь"); //} } }
void OnGUI() { if (map) { //отображаем карту на весь экран //scrollPosition = GUILayout.BeginScrollView( //scrollPosition, GUILayout.Width(690), GUILayout.Height(180)); //GUI.DrawTexture(new Rect(0, 0, Screen.width, Screen.height), texKarta[count], ScaleMode.ScaleToFit); //GUILayout.EndScrollView(); scrollPosition = GUILayout.BeginScrollView(scrollPosition); //GUI.DrawTexture(new Rect(0f, 0f, 250f, 200f), texKarta[count]); //GUILayout.Height(700f); GUILayout.Label(texKarta[count]); GUI.EndScrollView(); } OperationsWithGameObject.LightObject(gameObject, chosenGameObject); }