void Update() { if (Input.GetKeyDown(KeyCode.Tab)) { if (fields.Count <= _fieldIndexer) { _fieldIndexer = 0; } fields[_fieldIndexer].Select(); _fieldIndexer++; } if (Input.GetKeyDown(KeyCode.Return)) { loginAttempt(); } if (BackendHook.loginTokenString != null) { if (BackendHook.loginTokenString.Contains("User Not Found") || BackendHook.loginTokenString.Contains("Incorrect")) { badLoginShown = true; } else if (!pingModulesOnce) { Debug.Log("*hacker voice* I'm in"); StartCoroutine(BackendHook.avalibleModules()); pingModulesOnce = true; } } if (badLoginShown == true) { badLoginText.SetActive(true); } if (!getModLengths && BackendHook.modulesFound) { foreach (KeyValuePair <string, int> m in BackendHook.avalibleModulesDic) { StartCoroutine(BackendHook.getModuleQuestionCount(m.Value)); StartCoroutine(BackendHook.getModuleHighScore(m.Value)); } getModLengths = true; } // Don't hate me please if (getModLengths) { if (runninggetModuleInfo.Count == 0) { SceneManager.LoadScene("ModuleSelect"); } } }
void Start() { questionTimerArea.text = "5"; currentModuleID = -1; BackendHook.highScores.Clear(); endless = false; pictureMode = false; foreach (KeyValuePair <string, int> m in BackendHook.avalibleModulesDic) { StartCoroutine(BackendHook.getModuleHighScore(m.Value)); } }