Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        var config = new PNetC.ClientConfiguration(ip, port);

        Debug.Log("connecting to " + ip + ":" + port);
        Net.Connect(config);
    }
Ejemplo n.º 2
0
    private void OnRoomChange(string s)
    {
        Debug.Log("server switched us to room " + s);

        //TODO: this should probably be called after we actually switch scenes, but because we're not changing scenes, we'll call it right now
        Net.FinishedRoomChange();

        Net.RPC(3, StringSerializer.Instance.Update("This is a static rpc call. It goes to a room behaviour that is subscribed to it."));
    }