public void RigisterAccount() { if (userNameText.text == "") { tipText.text = "请输入用户名"; return; } if (userCodeText.text == "") { tipText.text = "请输入密码"; return; } if (userCodeIsOkText.text == "") { tipText.text = "请确认密码"; return; } if (userCodeIsOkText.text != userCodeText.text) { tipText.text = "两次密码不一致!"; return; } MyBmobUser user = new MyBmobUser(); user.username = userNameText.text; user.password = userCodeText.text; Bmob.Signup <MyBmobUser>(user, (response, exception) => { if (exception != null) { print("注册失败" + exception); tipText.text = "注册失败"; return; } print("注册成功"); tipText.text = "注册成功"; RigisterPanelHide(); } ); }
void updateuser() { Bmob.Login <MyBmobUser> ("test", "123456", (resp, ex) => { print(resp.sessionToken); MyBmobUser u = new MyBmobUser(); u.attack = 1000; Bmob.UpdateUser(resp.objectId, u, resp.sessionToken, (updateResp, updateException) => { if (updateException != null) { print("保存失败, 失败原因为: " + updateException.Message); return; } print("保存成功, @" + updateResp.updatedAt); }); }); }
void Signup() { MyBmobUser user = new MyBmobUser(); user.username = "******"; user.password = "******"; user.email = "*****@*****.**"; user.life = 0; user.attack = 0; Bmob.Signup <MyBmobUser> (user, (resp, exception) => { if (exception != null) { print("注册失败, 失败原因为: " + exception.Message); return; } print("注册成功"); }); }
void updateuser() { Bmob.Login<MyBmobUser> ("test", "123456", (resp, ex) => { print (resp.sessionToken); MyBmobUser u = new MyBmobUser (); u.attack = 1000; Bmob.UpdateUser (resp.objectId, u, resp.sessionToken, (updateResp, updateException) => { if (updateException != null) { print ("保存失败, 失败原因为: " + updateException.Message); return; } print ("保存成功, @" + updateResp.updatedAt); }); }); }
void Signup() { MyBmobUser user = new MyBmobUser (); user.username = "******"; user.password = "******"; user.email = "*****@*****.**"; user.life = 0; user.attack = 0; Bmob.Signup<MyBmobUser> (user, (resp, exception) => { if (exception != null) { print ("注册失败, 失败原因为: " + exception.Message); return; } print ("注册成功"); }); }