Selaa lähdekoodia

Merge branch 'F/0529_GHzDemo' of ssh://gogs.ghz-tech.com:30979/GHzGlass/GHZMRNavigatorPro into F/0529_GHzDemo

jiajun.hu.x 1 vuosi sitten
vanhempi
sitoutus
281c4aef5f

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 228 - 9
Assets/NavigatorPro.unity


+ 41 - 40
Assets/Scripts/ERNIEBot/ERNIEBotManager.cs

@@ -34,10 +34,11 @@ public class ERNIEBotManager : MonoBehaviour
     private bool isWakeup = false;
 
     private Vector3 irobotPos;
+
     private void Awake()
     {
-       //animator = Irobot.GetComponent<Animator>();
-     
+        //animator = Irobot.GetComponent<Animator>();
+       
     }
     private void OnEnable()
     {
@@ -108,7 +109,7 @@ public class ERNIEBotManager : MonoBehaviour
     {
         yield return new WaitForSeconds(times);
 
-        UnityToJava.yiYanClass.CallStatic("SpeekOff", "HelloWord1234568999");
+       // UnityToJava.yiYanClass.CallStatic("SpeekOff", "HelloWord1234568999");
     }
 
     
@@ -144,20 +145,7 @@ public class ERNIEBotManager : MonoBehaviour
         {
             myt.text = YiYanBack.MyTextlist.Dequeue();
             oldMyt = myt.text;
-        }
-
-        if (isCollect)
-        {
-            Debug.Log(isCollect);
-            isCollect = false;
-            StartSpeek();
-          
-        }
-        //else
-        //{
-        //    ui.gameObject.SetActive(true);
-        //}
-        
+        }     
 
         if (oldback != null && oldback == backt.text)
         {
@@ -172,8 +160,6 @@ public class ERNIEBotManager : MonoBehaviour
         }
         else
             times2 = 0;
-        
-
 
         if (oldMyt!=null && myt.text == oldMyt)
         {
@@ -188,11 +174,21 @@ public class ERNIEBotManager : MonoBehaviour
                 Irobot.gameObject.SetActive(true);
                 myt.text = "";
                 backfinalt.text = "";
+                backt.text = "";
              //   StartCoroutine(OpenSpeek(0.3f));
                 StartSpeek();
             }
 
+            if (myt.text.Contains("小度拜拜"))
+            {
+                isWakeup = false;
+                Irobot.gameObject.SetActive(false);
+                StartSpeek();
+            }
+
             times += Time.deltaTime;
+            if(times>1f)
+                StartCoroutine(AudioIconSetting(0, false));
             if (times > 3f)
             {
                 oldMyt = null;
@@ -234,45 +230,45 @@ public class ERNIEBotManager : MonoBehaviour
         UnityToJava.yiYanClass.CallStatic("StopSpeek");
         Debug.Log("StopSpeek====");
     }
+
+    public void StartSpeekOnClick()
+    {
+        StartSpeek();
+        YiYanBack.BackText.Clear();
+        YiYanBack.BackText = new Queue<char>();
+        myt.text = "";
+        backt.text = "";   
+    }
+
     public void StartSpeek()
     {
-           
+       
         UnityToJava.yiYanClass.CallStatic("StartSpeek");
-        Debug.Log("StartSpeek====");
-        //myt.text = "";
-        StartCoroutine(AudioIconSetting(1f, true));
+        Debug.Log("StartSpeek====");     
+        StartCoroutine(AudioIconSetting(0.7f, true));
     }
 
     public void send(string str)
-    {      
-        if(isWakeup)
+    {
+        StartCoroutine(AudioIconSetting(0, false));
+        if (isWakeup)
         {
-            if (str.Contains("小度拜拜"))
-            {
-                isWakeup = false;
-                Irobot.gameObject.SetActive(false);
-
-                StartSpeek();
-            }
-            else
-            {
-                UnityToJava.yiYanClass.CallStatic("SendText", str);
-                Debug.Log("Send   " + str);
-                StartCoroutine(AudioIconSetting(1f, false));
-            }
-           
+            UnityToJava.yiYanClass.CallStatic("SendText", str);
+            Debug.Log("Send   " + str);
         }
         else
         {
             StartSpeek();
         }
         backt.text = "";
+        myt.text = "";
+
     }
 
     private IEnumerator OpenSpeek( float times)
     {
         yield return new WaitForSeconds(times);
-        isCollect = true;
+        StartSpeek();
     }
 
     private IEnumerator PlayAnimator( string Animator_Name ,float times)
@@ -286,6 +282,11 @@ public class ERNIEBotManager : MonoBehaviour
 
     private IEnumerator AudioIconSetting(float times , bool state)
     {
+        //if(state)
+        //{
+        //    yield return new WaitForSeconds(0.5f);
+           
+        //}    
         yield return new  WaitForSeconds(times);
         ui.gameObject.SetActive(state);
     }

+ 1 - 1
Assets/StreamingAssets/build_info.txt

@@ -1 +1 @@
-Build from SK-20211220VCWK at 2023/6/7 10:17:58
+Build from SK-20211220VCWK at 2023/6/8 10:34:11

+ 1 - 1
ProjectSettings/ProjectSettings.asset

@@ -930,10 +930,10 @@ PlayerSettings:
       PointOfService: False
       RecordedCallsFolder: False
       Contacts: False
+      Proximity: False
       InternetClient: True
       CodeGeneration: False
       BackgroundMediaPlayback: False
-      Proximity: False
   metroTargetDeviceFamilies:
     Desktop: False
     Holographic: False

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä