예제 #1
0
    //PORTO
    public override void OnEventInvoked(object eventData)
    {
        //Debug.Log ("PORTo!!!!!!!!");

        if (eventData == null)
        {
            Debug.Log("PORTO event data must not be null");
            return;
        }

        if (eventData.GetType() != typeof(string[]))
        {
            Debug.Log("event data must be type of string[]");
            return;
        }

        string[] args = (string[])eventData;

        if (args.Length != 1)
        {
            Debug.Log("PORTO will get 1 arguments!");
            return;
        }

        connection.ChangePort(int.Parse(args [0]));
    }
예제 #2
0
    public override void OnEventInvoked(object eventData)
    {
        string[] args = (string[])eventData;

        connection.ChangeAdress(args [0]);
        connection.ChangePort(int.Parse(args [1]));

        connection.Send("CNNRQ;");

        playerObject.SetActive(true);

        autoConnector.isInGame = true;
    }