コード例 #1
0
    public void populateTextArea(List <int> emotionValues)
    {
        string emotion = graph.FindEmotion(emotionValues);

        //Debug.Log("Joy: " + emotionList[0] + ", Sadness: " + emotionList[1] + ", Anger: " + emotionList[2] + ", Disgust: " + emotionList[3] + ", Surprise: " + emotionList[4]);
        //Debug.Log(temp);
        textArea.text = emotion;
    }
コード例 #2
0
    public void populate(List <float> data)
    {
        List <int> emotionList = new List <int>();

        for (int i = 0; i < data.Count; i++)
        {
            emotionList.Add((int)data[i]);
        }

        string emotion = graph.FindEmotion(emotionList);

        //Debug.Log("Joy: " + emotionList[0] + ", Sadness: " + emotionList[1] + ", Anger: " + emotionList[2] + ", Disgust: " + emotionList[3] + ", Surprise: " + emotionList[4]);
        //Debug.Log(temp);
        textArea.text = emotion;
    }
コード例 #3
0
    public void buttonPress()
    {
        List <float> testList = emotions.getEmotion(1);

        List <int> emotionList = new List <int>();

        for (int i = 0; i < testList.Count; i++)
        {
            emotionList.Add((int)testList[i]);
        }

        string temp = graph.FindEmotion(emotionList);

        Debug.Log("Joy: " + emotionList[0] + ", Sadness: " + emotionList[1] + ", Anger: " + emotionList[2] + ", Disgust: " + emotionList[3] + ", Surprise: " + emotionList[4]);
        Debug.Log(temp);


        //debugging

        /*
         * //list of int's before finding emotion
         * Debug.Log("Int List: ");
         * for (int k = 0; k < emotionList.Count; k++)
         * {
         *  Debug.Log("Int: " + emotionList[k]);
         * }
         *
         * string temp = graph.FindEmotion(emotionList);
         *
         * //List of int's after finding emotion
         * Debug.Log("Int List again: ");
         * for (int k = 0; k < emotionList.Count; k++)
         * {
         *  Debug.Log("Int: " + emotionList[k]);
         * }*/

        //string temp = graph.FindEmotion(new List<int> { 99, 1, 0, 72, 14 });
    }