|
@@ -563,6 +563,8 @@ public class HomeController : MonoBehaviour
|
|
|
form.AddField("user_id", UserProperty.userId);
|
|
|
|
|
|
StartCoroutine(WebController.PostRequest(url, form, filePath, callback: VoiceCommandCallback));
|
|
|
+ // 打印时间
|
|
|
+ Debug.Log("Voice command training request at " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
}
|
|
|
else if (sceneMode == SceneMode.TRAINING)
|
|
|
{
|
|
@@ -585,6 +587,8 @@ public class HomeController : MonoBehaviour
|
|
|
// 语音呼唤上传回调函数
|
|
|
void VoiceCommandCallback(string json)
|
|
|
{
|
|
|
+ // 打印返回时间
|
|
|
+ Debug.Log("Voice command callback at " + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
|
|
|
if (sceneMode == SceneMode.INACTIVE)
|
|
|
{
|
|
|
Debug.Log("Voice command callback");
|
|
@@ -633,9 +637,20 @@ public class HomeController : MonoBehaviour
|
|
|
}
|
|
|
//animator.SetTrigger(animationTrigger);
|
|
|
animator.Play(animationTrigger);
|
|
|
- animator.SetBool(animationBool, true);
|
|
|
+ string[] noStatusCommand = { "turnL", "turnR" };
|
|
|
+ if (Array.IndexOf(noStatusCommand, animationTrigger) < 0)
|
|
|
+ {
|
|
|
+ animator.SetBool(animationBool, true);
|
|
|
+ Debug.Log(animationBool+"status is"+animator.GetBool(animationBool));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // turnL 和 turnR 动画不需要设置状态
|
|
|
+ }
|
|
|
+ // animator.SetBool(animationBool, true);
|
|
|
|
|
|
// 交互动画执行一段时间后停止
|
|
|
+ dogsInScene[GameData.focusDog].interactAnimationStartTime = DateTime.Now;
|
|
|
StartCoroutine(dogsInScene[GameData.focusDog].InteractAnimationCountDown());
|
|
|
}
|
|
|
else
|