}//end update public void verificationCheck() { Loader.I.enableLoader(); if (verificationCode.text == "") { lockImg.DOColor(eColor, 1); wrongLogin.SetActive(true); wrongLogin.GetComponent <Text>().text = "Je hebt niks ingevoerd!"; Loader.I.disableLoader(); } //if internet connection, start verificaiton if (i_access) { if (verificationCode.text != "") { string code = verificationCode.text; GamedoniaData.Count("staticdata", "{\"playCode\":\"" + code + "\"}", delegate(bool success, int count) { if (success) { if (count == 1) { //TODO Your success processing // setting bool PlayerManager.I.player.verificationComplete = true; //loading login screen SceneManager.LoadScene("Login"); //saving player files PlayerManager.I.Save(); lockImg.DOColor(dColor, 1); } else { //when password is wrong lockImg.DOColor(eColor, 1); wrongLogin.SetActive(true); wrongLogin.GetComponent <Text>().text = "Wachtwoord onjuist"; Loader.I.disableLoader(); } } }); } } else { //start waiting for connection void StartCoroutine(waitForConnection(waitForConnectionTime)); } }
private void checkIfMatchExists(string matchId) { GamedoniaData.Count("matches", "{_id:{$oid:'" + matchId + "'}}", delegate(bool success, int count){ if (success) { Debug.Log("matches" + count); if (count == 0) { RemoveMatch(null, matchId); } } else { //TODO Your fail processing } }); }