Beispiel #1
0
    public void Insert()
    {
        GameObject      research       = GameObject.Find("Canvas");
        ResearchControl researchScript = research.GetComponent <ResearchControl>();

        InsertPlayerInfo(researchScript.jogador, researchScript.email, researchScript.aux);
    }
Beispiel #2
0
    // Use this for initialization
    public IEnumerator Coroutine()
    {
        GameObject      user     = GameObject.Find("Canvas");
        ResearchControl getEmail = user.GetComponent <ResearchControl>();

        email = getEmail.email;

        WWW cdPlayer = new WWW(urlGetEmail + email);

        yield return(cdPlayer);

        cdPlayerByEmail = cdPlayer.text.ToString();
        print(cdPlayerByEmail);
        cdPlayerEmail = int.Parse(cdPlayerByEmail);
        print(cdPlayerEmail);
    }
Beispiel #3
0
    void GenerateResearch()
    {
        i = researchArray.GetLength(0);

        for (int countTheLoop = 0; countTheLoop < i; countTheLoop++)
        {
            //GameObject.Instantiate(researchPrefab);
            GameObject      newObject = (GameObject)GameObject.Instantiate(researchPrefab, new Vector3(0f, 0f, 0f), new Quaternion(0f, 0f, 0f, 0f));
            ResearchControl rControl  = newObject.GetComponent <ResearchControl>();

            rControl.researchName = researchArray[countTheLoop, 0];

            rControl.researchType = researchArray[countTheLoop, 1];

            string middle = researchArray[countTheLoop, 2];
            rControl.moneyCost = int.Parse(middle);

            middle = researchArray[countTheLoop, 3];
            rControl.researchPointsCost = int.Parse(middle);

            middle            = researchArray[countTheLoop, 4];
            rControl.actValue = float.Parse(middle);

            middle = researchArray[countTheLoop, 5];
            if (middle == "yes")
            {
                rControl.possibleToActivate = true;
            }
            else
            {
                rControl.possibleToActivate = false;
            }

            middle = researchArray[countTheLoop, 6];
            if (middle == "yes")
            {
                rControl.activated = true;
            }
            else
            {
                rControl.activated = false;
            }
            Debug.Log(countTheLoop);
        }

        Debug.Log("wuche");
    }