Exemplo n.º 1
0
    public void ComputeMood()
    {
        if (isControl) {
            mood = SerialData.Mood.Neutral;
        } else {
            // Sets EMG and GSR to the average between the baseline and the initial measurement.
            serialData.baseline.x = (startSegment.GSRAverage + serialData.baseline.x) / 2;
            serialData.baseline.y = (startSegment.EMGAverage + serialData.baseline.y) / 2;

            mood = serialData.CalculateMood (new Vector2 (middleSegment.GSRAverage, middleSegment.EMGAverage));
        }
    }
Exemplo n.º 2
0
 void Update()
 {
     mood = serialData.mood;
     GetComponent<Text>().text = "Current Mood: " + mood.ToString();
 }