Example #1
0
 public void Submit()
 {
     StartCoroutine(SendPiontRequest(point, gameId, json =>
     {
         ResponseQueryGame rs = JsonUtility.FromJson <ResponseQueryGame>(json);
         Debug.Log(json);
         if (!rs.error)
         {
             //SetGlobalData(rs.idGame);
             cameraVr.GetComponent <VrModeController>().ExitVR();
             ViewLoadScene(nextLevel);
         }
         else
         {
         }
     }));
 }
Example #2
0
 public void SubmitLogin()
 {
     StartCoroutine(LoginGameRequest(user2.text, password2.text, json =>
     {
         ResponseQueryGame rs = JsonUtility.FromJson <ResponseQueryGame>(json);
         Debug.Log(json);
         if (!rs.error)
         {
             if (rs.idGame != null && rs.idGame != 0)
             {
                 SetGlobalData(rs.idGame, rs.player);
                 ViewLoadScene(nextLevel);
             }
         }
         else
         {
         }
     }));
 }