Esempio n. 1
0
 void Start()
 {
     this.client = GameObject.FindGameObjectWithTag("Communication").GetComponent <ReaLabCommunication>();
     this.client.Connect();
     this.client.onPause            += Client_onPause;
     this.client.onNewConfiguration += Client_onNewConfiguration;
     this.client.onStop             += Client_onStop;
 }
Esempio n. 2
0
    private void Client_onStop(object obj, EventArgs stopArgs)
    {
        this.client.Disconnect();
        this.client.onPause            -= Client_onPause;
        this.client.onNewConfiguration -= Client_onNewConfiguration;
        this.client = null;

        this.canGameStop = true;
    }
Esempio n. 3
0
 void OnApplicationQuit()
 {
     Debug.Log("Quit");
     if (this.client != null)
     {
         Debug.Log("Disco Quit");
         this.client.Disconnect();
         this.client.onPause            -= Client_onPause;
         this.client.onNewConfiguration -= Client_onNewConfiguration;
         this.client = null;
     }
 }