From 510fb2de7a5de90fb1dc998a509298fe6800f31b Mon Sep 17 00:00:00 2001 From: sheldonlei Date: Wed, 16 Dec 2020 10:41:35 -0500 Subject: [PATCH] v0.4 commit --- Assets/Scenes/Luna.unity | 2 +- Assets/Scripts/AudioControl.cs | 3 ++- Assets/Scripts/EmotionInput.cs | 2 ++ Assets/Scripts/EmotionUpdate.cs | 7 ++++--- Assets/Scripts/SignalRequester.cs | 2 ++ Assets/Scripts/SlideControl.cs | 3 ++- ProjectSettings/UnityConnectSettings.asset | 5 ++++- 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Assets/Scenes/Luna.unity b/Assets/Scenes/Luna.unity index d96a63d..e82eac7 100644 --- a/Assets/Scenes/Luna.unity +++ b/Assets/Scenes/Luna.unity @@ -6621,7 +6621,7 @@ MonoBehaviour: globalEasing: 4 configReady: 1 inspStateFoldoutProcessing: 0 - inspStateFoldoutSettings: 1 + inspStateFoldoutSettings: 0 inspStateFoldoutVisemes: 0 inspCollectionDisplayMode: 0 inspAnalysisDisplay: 0 diff --git a/Assets/Scripts/AudioControl.cs b/Assets/Scripts/AudioControl.cs index f5f1ab8..2dd219d 100644 --- a/Assets/Scripts/AudioControl.cs +++ b/Assets/Scripts/AudioControl.cs @@ -5,13 +5,14 @@ public class AudioControl : MonoBehaviour static Object[] audioList; static AudioSource audioPlayer; static int maxAudio; - static int currentAudio = 0; + static int currentAudio; GameObject character; void Start() { character = GameObject.FindGameObjectWithTag("Player"); audioPlayer = gameObject.GetComponent(); + currentAudio = 0; if (character.name == Global.luna) { diff --git a/Assets/Scripts/EmotionInput.cs b/Assets/Scripts/EmotionInput.cs index f3884dd..cb91175 100644 --- a/Assets/Scripts/EmotionInput.cs +++ b/Assets/Scripts/EmotionInput.cs @@ -1,6 +1,8 @@ using UnityEngine; using UnityEngine.Audio; +// used for triggering event when detecting emotion shift + public class EmotionInput : MonoBehaviour { private MasterControl currentEvent; diff --git a/Assets/Scripts/EmotionUpdate.cs b/Assets/Scripts/EmotionUpdate.cs index a9cf70d..d669f01 100644 --- a/Assets/Scripts/EmotionUpdate.cs +++ b/Assets/Scripts/EmotionUpdate.cs @@ -1,8 +1,9 @@ -using System; -using System.Collections; +using System.Collections; using System.Collections.Generic; using UnityEngine; +// used for constant update the most frequent emotion + public class EmotionUpdate : MonoBehaviour { float startTime; @@ -36,7 +37,7 @@ void Update() public void RequestSignal() { requester = new SignalRequester(); - requester.message = "checking------runtime: " + currentTime; + requester.message = "runtime: " + currentTime + "\nagent emotion: " + EmotionInput.currentEmotion; requester.Start(); emotionList.Dequeue(); diff --git a/Assets/Scripts/SignalRequester.cs b/Assets/Scripts/SignalRequester.cs index d51869e..991ce04 100644 --- a/Assets/Scripts/SignalRequester.cs +++ b/Assets/Scripts/SignalRequester.cs @@ -3,6 +3,8 @@ using NetMQ.Sockets; using UnityEngine; +// create a thread instance to communicate with python + public class SignalRequester : RunAbleThread { public override void Run() diff --git a/Assets/Scripts/SlideControl.cs b/Assets/Scripts/SlideControl.cs index e0acdbe..dbf7e62 100644 --- a/Assets/Scripts/SlideControl.cs +++ b/Assets/Scripts/SlideControl.cs @@ -6,12 +6,13 @@ public class SlideControl : MonoBehaviour static Renderer slideShader; static Object[] textureList; static int maxSlide; - static int currentSlide = 0; + static int currentSlide; void Start() { // get the slide object's material slide = GameObject.Find(Global.slideObj); + currentSlide = 0; if (!slide) { print("slide gameobject not found"); diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset index 584eee7..a8668ad 100644 --- a/ProjectSettings/UnityConnectSettings.asset +++ b/ProjectSettings/UnityConnectSettings.asset @@ -28,7 +28,10 @@ UnityConnectSettings: m_TestMode: 0 m_IosGameId: m_AndroidGameId: - m_GameIds: {} + m_GameIds: + AndroidPlayer: + iPhonePlayer: + tvOSPlayer: m_GameId: PerformanceReportingSettings: m_Enabled: 0