Exemple #1
0
 //Subscribes functions to Events, already taken care of in Start
 public void SubscribeEvents()
 {
             #if DEBUG
     Debug.Log("Subscribing to all events");
             #endif
     //Subscribe NewZoneEvent
     manager.NewZoneEvent += (newZoneEventHandler = new EmotionDeviceManager.NewZoneEventHandler(OnNewZone));
     //SubscribeConnectedEvent
     manager.ConnectedEvent += (deviceConnectedDeviceHandler = new EmotionDeviceManager.DeviceConnectedDeviceHandler(OnConnected));
     //Subscribe NewEmotionMeasurementEvent
     manager.NewEmotionMeasurementEvent += (newEmotionMeasurementEventHandler = new EmotionDeviceManager.NewEmotionMeasurementEventHandler(OnNewEmotionMeasurement));
     //Subscribe ThresholdCalculatedEvent
     manager.ThresholdCalculatedEvent += (thresholdCalculatedEventHandler = new EmotionDeviceManager.ThresholdCalculatedEventHandler(OnThresholdCalculated));
     //Subscribe GameInvalidEvent
     manager.GameInvalidEvent += (gameInvalidEventHandler = new EmotionDeviceManager.GameInvalidEventHandler(OnGameInvalid));
 }
	//Subscribes functions to Events, already taken care of in Start
	public void SubscribeEvents(){
#if DEBUG 
		Debug.Log("Subscribing to all events");
#endif
		//Subscribe NewZoneEvent
		manager.NewZoneEvent += (newZoneEventHandler = new EmotionDeviceManager.NewZoneEventHandler (OnNewZone));
		//SubscribeConnectedEvent
		manager.ConnectedEvent += (deviceConnectedDeviceHandler = new EmotionDeviceManager.DeviceConnectedDeviceHandler (OnConnected));
		//Subscribe NewEmotionMeasurementEvent
		manager.NewEmotionMeasurementEvent += (newEmotionMeasurementEventHandler = new EmotionDeviceManager.NewEmotionMeasurementEventHandler (OnNewEmotionMeasurement));
		//Subscribe ThresholdCalculatedEvent
		manager.ThresholdCalculatedEvent += (thresholdCalculatedEventHandler = new EmotionDeviceManager.ThresholdCalculatedEventHandler (OnThresholdCalculated));
		//Subscribe GameInvalidEvent
		manager.GameInvalidEvent += (gameInvalidEventHandler = new EmotionDeviceManager.GameInvalidEventHandler (OnGameInvalid));

	}