Advertisement
Guest User

Untitled

a guest
May 30th, 2015
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Staty : MonoBehaviour {
  5.  
  6.     // Use this for initialization
  7.     void Start ()
  8.     {
  9.         GenerujLinkOdczytywaniaZmiennej("email", "Fores", "");
  10.     }
  11.    
  12.     // Update is called once per frame
  13.     void Update () {
  14.    
  15.     }
  16.  
  17.     void GenerujLinkOdczytywaniaZmiennej(string zmienna, string nazwaGracza, string tabela)
  18.     {
  19.         if(tabela == "") tabela = "Konta";
  20.         WWWForm form = new WWWForm();
  21.         form.AddField("zmienna", zmienna);
  22.         form.AddField("gracz", nazwaGracza);
  23.         form.AddField("tabela", tabela);
  24.         WWW w = new WWW("test69.bugs3.com/Skrypty/odczytDanych.php");
  25.         StartCoroutine(OdczytajZmienna(w));
  26.     }
  27.  
  28.     IEnumerator OdczytajZmienna(WWW w)
  29.     {
  30.         yield return w;
  31.         Debug.Log (w.text);
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement