示例#1
0
    void Comparison()
    {
        NodeLink CurrentNodeLink = GetComponent <NodeLink>();

        bool isInCorrectWireIndex = false;

        var        ComparisonArray  = CollabVertxObjectHandler.ObjectComparisonList.ToArray();
        GameObject firstGameObject  = ComparisonArray[0];
        GameObject secondGameObject = ComparisonArray[1];

        for (int i = 0; i < (ConnectionArray.Length / 4); i++)
        {
            string   name = ConnectionArray[i, 0].ToString() + ConnectionArray[i, 1].ToString();
            Argument args = new Argument(name, i);
            if (firstGameObject.name == ConnectionArray[i, 0] && secondGameObject.name == ConnectionArray[i, 1] || secondGameObject.name == ConnectionArray[i, 0] && firstGameObject.name == ConnectionArray[i, 1])
            {
                if (i <= 4)
                {
                    isInCorrectWireIndex = true;
                }

                switch (ConnectionArray[i, 3])
                {
                case "0":
                    CurrentNodeLink.Fire("LoadWire", args);
                    if (isInCorrectWireIndex)
                    {
                        CorrectWireCount++;
                    }
                    else
                    {
                        IncorrectWireCount++;
                    }
                    break;

                case "1":
                    CurrentNodeLink.Fire("DeleteWire", args);
                    if (isInCorrectWireIndex)
                    {
                        CorrectWireCount--;
                    }
                    else
                    {
                        IncorrectWireCount--;
                    }
                    break;
                }
                break;
            }
        }
    }
示例#2
0
    void Dropped(string guid)
    {
        NodeLink NL = NodeLink.Find(guid);

        lastMessage = "Dropped";
        NL.Fire("OnlineDrop", guid);
    }
示例#3
0
    //private string tempViewPoint;

    void Grabbed(string guid)
    {
        NodeLink NL = NodeLink.Find(guid);

        Tempguid = guid;
        NL.Fire("OnlineGrab", guid);
        lastMessage = "OnlineGrab";
        Debug.Log("SENT");
    }