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); } } } } }