Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System;
- public class TestClient : MonoBehaviour {
- private TestRequester _testRequester;
- public event Action<bool> OnHandleResponse;
- private void Start() {
- _testRequester = new TestRequester();
- _testRequester.OnReceiveResponse += HandleResponse;
- _testRequester.Start();
- }
- private void OnDestroy() {
- _testRequester.Stop();
- }
- public void SendCalibrationPoint(Vector2 point) {
- _testRequester.AddSendCommand(point.ToString());
- }
- private void HandleResponse(bool result) {
- OnHandleResponse(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement