コード例 #1
0
    public void Send()
    {
        handler.unHideImages();
        GameObject clustertext    = UiHandler.currentCluster;
        float      shortestLength = float.MaxValue;
        int        index          = 0;


        for (int i = 0; i < maker.allImages.Length; i++)
        {
            float length = Vector3.Distance(maker.allImages[i].transform.position, clustertext.transform.position);
            if (length < shortestLength)
            {
                shortestLength = length;
                index          = i;
            }
        }
        string clusterData = "";

        int clusterNr = maker.allImages[index].cluster;

        for (int i = 0; i < maker.allImages.Length; i++)
        {
            if (maker.allImages[i].cluster == clusterNr)
            {
                if (clusterData == "")
                {
                    clusterData = "" + maker.allImages[i].GameName;
                }
                else
                {
                    clusterData = clusterData + "," + maker.allImages[i].GameName;
                }
            }
        }



        StartCoroutine(SendFormData(clusterData, thoughtData.text));


        field.text       = "";
        thoughtData.text = "";

        handler.otherCanvas.SetActive(true);
        handler.currentGroup++;
        handler.Done();
        sendDataObj.SetActive(false);
    }