Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Main : MonoBehaviour {
- void Start(){
- Login("User1", "suco_de_laranja");
- }
- void Login(string user, string password){
- Request request = new Request("http://game/api.php?action=checkCredentials&user="+user+"&password="+password);
- request.onDownload+= (Data result) => {
- if(result.sucess){
- Request requestData = new Request("http://game/api.php?action=getUserData&user="+user+"&password="+password);
- requestData.onDownload+= (Data result) => {
- if(result.sucess){
- Debug.log("usuário logado!");
- }else{
- Debug.log("Falha no login!");
- }
- };
- }
- };
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement