void TaskOnClick()
    {
        switch (type.value)
        {
        case 0: {                          //Pilot
            SCPilot m = new SCPilot(direction.text, other.text);
            net.SendSocketMessage(m);
            break;
        }

        case 1: {                          //Nav
            SCNav m = new SCNav(int.Parse(loc.text), other.text);
            net.SendSocketMessage(m);
            break;
        }

        default:
            break;
        }
    }
Ejemplo n.º 2
0
    void handleNav(string message)
    {
        SCNav m = JsonUtility.FromJson <SCNav>(message);

        messageDisplay.text = "Type: " + m.type + ", Loc: " + m.loc + ", Other: " + m.other;
    }