private void GameOverMessage() { // gameObjectGameOverScreenPaper = GameObject.Find("Systems/Death/GameOverScreen/Paper"); if (gameObjectSystems == null) { gameObjectSystems = GameObject.Find("Systems"); } if (gameObjectSystems == null) { return; } gameObjectSystemsDeath = GameObjectUtil.GetChildGameObject(gameObjectSystems, "Death"); if (gameObjectSystemsDeath == null) { return; } gameObjectSystemsDeathGameOverScreen = GameObjectUtil.GetChildGameObject(gameObjectSystemsDeath, "GameOverScreen"); if (gameObjectSystemsDeathGameOverScreen == null) { return; } gameObjectSystemsDeathGameOverScreenPaper = GameObjectUtil.GetChildGameObject(gameObjectSystemsDeathGameOverScreen, "Paper"); if (gameObjectSystemsDeathGameOverScreenPaper == null) { return; } for (int i = 0; i < gameObjectSystemsDeathGameOverScreenPaper.transform.childCount; i++) { isGameOverScreen = false; GameObject childGameObject = gameObjectSystemsDeathGameOverScreenPaper.transform.GetChild(i).gameObject; if (childGameObject != null && (childGameObject.activeSelf || Input.GetKey(KeyCode.LeftAlt) && Input.GetKey(KeyCode.G))) { isGameOverScreen = true; // string path = GameObjectUtil.getGameObjectPath(childGameObject); // string pathTextEn = path + "/TextEN"; // GameObject textEnGameObject = GameObject.Find(pathTextEn); GameObject textEnGameObject = GameObjectUtil.GetChildGameObject(childGameObject, "TextEN"); if (textEnGameObject != null) { gameOverTextMesh = GameObjectUtil.FindGameObjectTextMesh(textEnGameObject); if (gameOverTextMesh != null) { string gameOverText = gameOverTextMesh.text.Trim(); string translateString = translateText.TranslateString(gameOverText, TranslateText.DICT_GAMEOVER); GUI.Label(subtitlesRect, translateString, subtitlesGuiStyle); } } } } }
private void GameOverMessage() { // gameObjectGameOverScreenPaper = GameObject.Find("Systems/Death/GameOverScreen/Paper"); if (GlobalVariables.GetGlobalVariables().gameObjectSystems == null) { return; } gameObjectSystemsDeath = GameObjectUtil.GetChildGameObject(GlobalVariables.GetGlobalVariables().gameObjectSystems, "Death"); if (gameObjectSystemsDeath == null) { return; } gameObjectSystemsDeathGameOverScreen = GameObjectUtil.GetChildGameObject(gameObjectSystemsDeath, "GameOverScreen"); if (gameObjectSystemsDeathGameOverScreen == null) { return; } gameObjectSystemsDeathGameOverScreenPaper = GameObjectUtil.GetChildGameObject(gameObjectSystemsDeathGameOverScreen, "Paper"); if (gameObjectSystemsDeathGameOverScreenPaper == null) { return; } for (int i = 0; i < gameObjectSystemsDeathGameOverScreenPaper.transform.childCount; i++) { GameObject childGameObject = gameObjectSystemsDeathGameOverScreenPaper.transform.GetChild(i).gameObject; if (childGameObject != null && (childGameObject.activeSelf || GlobalVariables.GetGlobalVariables().keyBindGameOverTextToTxt.IsDown())) { GameObject textEnGameObject = GameObjectUtil.GetChildGameObject(childGameObject, "TextEN"); if (textEnGameObject != null) { gameOverTextMesh = GameObjectUtil.FindGameObjectTextMesh(textEnGameObject); if (gameOverTextMesh != null) { string gameOverText = gameOverTextMesh.text.Trim(); string translateString = translateText.TranslateString(gameOverText, TranslateText.DICT_GAMEOVER); GUI.Label(subtitlesRect, translateString, subtitlesGuiStyle); } } } } }
public void Init() { translateText = new TranslateText(); subtitlesGuiStyle = new GUIStyle() { alignment = TextAnchor.MiddleCenter, fontSize = (int)(14.0f * (float)(Screen.width) / 1000f) }; subtitlesGuiStyle.normal.textColor = new Color(255, 165, 0); subtitlesRect = new Rect(0, (Screen.height) / 2.15f, Screen.width, Screen.height); partnamesGuiStyle = subtitlesGuiStyle; partnamesRect = new Rect(0, (Screen.height) / 2.4f, Screen.width, Screen.height); interactionsGuiStyle = new GUIStyle() { alignment = TextAnchor.MiddleCenter, fontSize = (int)(14.0f * (float)(Screen.width) / 1000f) }; interactionsGuiStyle.normal.textColor = new Color(255, 255, 255); interactionsRect = new Rect(0, (Screen.height) / 12f, Screen.width, Screen.height); mouseTipGuiStyle = new GUIStyle() { alignment = TextAnchor.LowerLeft, fontSize = (int)(14.0f * (float)(Screen.width) / 1000f) }; mouseTipGuiStyle.normal.textColor = new Color(255, 255, 255); subtitlesTextMesh = GameObjectUtil.FindGameObjectTextMesh("GUI/Indicators/Subtitles"); partnamesTextMesh = GameObjectUtil.FindGameObjectTextMesh("GUI/Indicators/Partname"); interactionsTextMesh = GameObjectUtil.FindGameObjectTextMesh("GUI/Indicators/Interaction"); }