void Promote() { promotionHeader.text = "You've been promoted!"; string line = "You've been recognized for your efforts and have been promoted to the\n\n\n\nYou may stay and practice the ## protocol or you may advance to the next office."; string[] parts = certificateText.text.Split('\n'); string currentProtocol = parts[0]; string nextOfficeLocation = parts[1]; string staySubtextLine1 = parts[2]; string staySubtextLine2 = parts[3]; string staySubtextString = ""; Debug.Log(staySubtextLine2); if (!string.IsNullOrEmpty(staySubtextLine2)) { staySubtextString = staySubtextLine1 + "\n" + staySubtextLine2; } else { staySubtextString = staySubtextLine1; } string advanceSubtextLine1 = "Proceed To"; string advanceSubtextLine2 = nextOfficeLocation; string advanceSubtextString = ""; Debug.Log(advanceSubtextLine2); if (!string.IsNullOrEmpty(advanceSubtextLine2)) { advanceSubtextString = advanceSubtextLine1 + "\n" + advanceSubtextLine2; } else { advanceSubtextString = advanceSubtextLine1; } line = line.Replace("##", currentProtocol); promotionLocationText.text = nextOfficeLocation; staySubtext.text = staySubtextString; advanceSubtext.text = advanceSubtextString; promotionUI.SetAdvanceButtonText("Advance To " + nextOfficeLocation); promotionText.text = line; promotionUI.EnableUI(true, false); waitingToAdvance = true; SortingAttempt.Reset(); SetScore(); }
void Promote() { promotionHeader.text = "You've been promoted!"; string line = "You've been recognized for your efforts and have been promoted to the\n\n\n\nYou may stay and practice the ## protocol or you may advance to the next office."; string[] parts = certificateText.text.Split('\n'); string currentProtocol = parts[0]; string nextOfficeLocation = parts[1]; string staySubtextLine1 = parts[2]; string staySubtextLine2 = parts[3]; string staySubtextString = ""; Debug.Log(staySubtextLine2); if (!string.IsNullOrEmpty(staySubtextLine2)) { staySubtextString = staySubtextLine1 + "\n" + staySubtextLine2; } else { staySubtextString = staySubtextLine1; } string advanceSubtextLine1 = "Proceed To"; string advanceSubtextLine2 = nextOfficeLocation; string advanceSubtextString = ""; Debug.Log(advanceSubtextLine2); if (!string.IsNullOrEmpty(advanceSubtextLine2)) { advanceSubtextString = advanceSubtextLine1 + "\n" + advanceSubtextLine2; } else { advanceSubtextString = advanceSubtextLine1; } line = line.Replace("##", currentProtocol); promotionTextLocation.text = nextOfficeLocation; staySubtext.text = staySubtextString; advanceSubtext.text = advanceSubtextString; if (ThisLevel == DNSLevel.TopLevel) { nextOfficeLocation = "Expand Company"; promotionHeader.text = "Thanks For Playing"; line = "This game was created by Casey Lafferty as part of his master's research in gamification under the advisement of Dr. Stephen Cooper.\n\nHuman characters:\nCurt - cjc83486 - https://opengameart.org/content/rpg-character\nSogomn - https://opengameart.org/content/animated-character\ndbhvk - https://opengameart.org/content/character-sprite-walk-animation\narikel - https://opengameart.org/content/2d-rpg-character-walk-spritesheet\nAll other game assets were created by Casey."; promotionTextLocation.text = ""; staySubtext.text = "Proceed to\nMain Menu"; advanceSubtext.text = "Quit to\nDesktop"; } advanceUI.SetAdvanceButtonText("Advance To " + nextOfficeLocation); promotionText.text = line; advanceUI.EnableUI(true, false); waitingToAdvance = true; SortingAttempt.Reset(); SetScore(); }