// Use this for initialization void Start() { this.connectionButton = gameObject.GetComponent <Button> (); this.remoteStream = GameObject.FindGameObjectWithTag("remoteStream").GetComponent <ScreenStream> (); this.buttonText = gameObject.GetComponentInChildren <Text> (); this.paintScript = GameObject.FindGameObjectWithTag("Painter").GetComponent <Paint>(); this.connectionButton.onClick.AddListener(() => { this.remoteStream.PublishStream = !this.remoteStream.PublishStream; if (this.remoteStream.PublishStream) { this.buttonText.text = "Disconnect"; remoteStream.RemoteMouse.Updated += RemoteMouse_Updated; } else { this.buttonText.text = "Connect"; remoteStream.RemoteMouse.Updated -= RemoteMouse_Updated; } }); }
public DataReceiver(ScreenStream screen, WebCamStreamer webCamStreamer) { this.screen = screen; this.webCamStreamer = webCamStreamer; }