Exemple #1
0
    void SubmitValue(string arg0)
    {
        if (!heap.inProgress && heap.Size() < numberOfNodes)
        {
            if (manualInput.text != "")
            {
                GameObject.Find("SoundEffects").GetComponent <SoundEffects> ().New();
                GameObject u = Instantiate(node, rootPos) as GameObject;
                u.GetComponent <RectTransform> ().localScale = Vector3.one;
                u.GetComponent <Node> ().SetData(int.Parse(arg0));
                u.name = u.GetComponent <Node> ().data + "  -  Node" + heap.Size();
                heap.StartCoroutine("Insert", u);

                manualInput.text = "";
            }
        }
    }