protected IEnumerator RegisterUser(KiiUser user, string password, KiiUserCallback callback) { // TODO: Move following code to common method/class bool endFlag = false; user.Register(password, (KiiUser u, Exception e) => { callback(u, e); endFlag = true; }); while (!endFlag) { yield return(new WaitForSeconds(1)); } yield return(user); }
protected IEnumerator LogInUser(string username, string password, KiiUserCallback callback) { // TODO: Move following code to common method/class bool endFlag = false; KiiUser.LogIn(username, password, (KiiUser u, Exception e) => { callback(u, e); endFlag = true; }); while (!endFlag) { yield return(new WaitForSeconds(1)); } yield return(KiiUser.CurrentUser); }