1
This commit is contained in:
parent
d6e7eaa5ae
commit
fa3fbcf58e
@ -25,7 +25,7 @@ MonoBehaviour:
|
|||||||
m_Start: 0
|
m_Start: 0
|
||||||
m_ClipIn: 0
|
m_ClipIn: 0
|
||||||
m_Asset: {fileID: -1020249500316461220}
|
m_Asset: {fileID: -1020249500316461220}
|
||||||
m_Duration: 4
|
m_Duration: 6.033333333333333
|
||||||
m_TimeScale: 1
|
m_TimeScale: 1
|
||||||
m_ParentTrack: {fileID: -8792457145005740953}
|
m_ParentTrack: {fileID: -8792457145005740953}
|
||||||
m_EaseInDuration: 0
|
m_EaseInDuration: 0
|
||||||
|
|||||||
26
Assets/SenSorSystem/AudioSensor.cs
Normal file
26
Assets/SenSorSystem/AudioSensor.cs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO.Ports;
|
||||||
|
using System.Text;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class AudioSensor : Sensor
|
||||||
|
{
|
||||||
|
public override void ReceiveData(string datas, SerialPort sp = null)
|
||||||
|
{
|
||||||
|
base.ReceiveData(datas, sp);
|
||||||
|
//this.Log(datas);
|
||||||
|
if (datas.Contains("hello"))
|
||||||
|
{
|
||||||
|
ChatUI.Instance.xunFeiWakeup.callBack?.Invoke();
|
||||||
|
}
|
||||||
|
//if (datas.ToString().TrimEnd('\n', '\r') == "hello")
|
||||||
|
//{
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Display(string datas)
|
||||||
|
{
|
||||||
|
base.Display(datas);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Assets/SenSorSystem/AudioSensor.cs.meta
Normal file
11
Assets/SenSorSystem/AudioSensor.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b80e6b07356243c4299c1d44804c44d0
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -37,7 +37,7 @@ public class ChatUI : MonoBehaviour
|
|||||||
private float wakeUpCountdownTime = 5f;
|
private float wakeUpCountdownTime = 5f;
|
||||||
private float wakeUpCurrentTime;
|
private float wakeUpCurrentTime;
|
||||||
private Coroutine coroutine;
|
private Coroutine coroutine;
|
||||||
public XunFeiWakeup xunFeiWakeup;//语音唤醒
|
public ZXKWakeup xunFeiWakeup;//语音唤醒
|
||||||
private bool chatUIOpen;
|
private bool chatUIOpen;
|
||||||
private string speakTxt;
|
private string speakTxt;
|
||||||
public string SpeakTxt
|
public string SpeakTxt
|
||||||
|
|||||||
@ -62451,6 +62451,50 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
serializedGuid: 3654304ac7261b4f90f36998fcbab5b4
|
serializedGuid: 3654304ac7261b4f90f36998fcbab5b4
|
||||||
|
--- !u!1 &558201749
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 558201750}
|
||||||
|
- component: {fileID: 558201751}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: AudioSensor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &558201750
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 558201749}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 6827219332398779361}
|
||||||
|
m_RootOrder: 8
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &558201751
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 558201749}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: b80e6b07356243c4299c1d44804c44d0, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
--- !u!114 &558228926
|
--- !u!114 &558228926
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -167498,6 +167542,7 @@ MonoBehaviour:
|
|||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
daoNiaoDeep: 0
|
daoNiaoDeep: 0
|
||||||
txt: {fileID: 439032091}
|
txt: {fileID: 439032091}
|
||||||
|
isOpen: 0
|
||||||
--- !u!114 &1845712798
|
--- !u!114 &1845712798
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -215508,7 +215553,7 @@ MonoBehaviour:
|
|||||||
prefab_v: {fileID: 8158746091421267058}
|
prefab_v: {fileID: 8158746091421267058}
|
||||||
prefab_h_next: {fileID: 5884512289144936276}
|
prefab_h_next: {fileID: 5884512289144936276}
|
||||||
prefab_v_next: {fileID: 2722395429469450090}
|
prefab_v_next: {fileID: 2722395429469450090}
|
||||||
xunFeiWakeup: {fileID: 5420903453684334964}
|
xunFeiWakeup: {fileID: 612443805}
|
||||||
--- !u!114 &2111419097266103041
|
--- !u!114 &2111419097266103041
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -330268,6 +330313,7 @@ Transform:
|
|||||||
- {fileID: 9084052909658758007}
|
- {fileID: 9084052909658758007}
|
||||||
- {fileID: 9084052909769445838}
|
- {fileID: 9084052909769445838}
|
||||||
- {fileID: 1845712796}
|
- {fileID: 1845712796}
|
||||||
|
- {fileID: 558201750}
|
||||||
m_Father: {fileID: 8343209867889649114}
|
m_Father: {fileID: 8343209867889649114}
|
||||||
m_RootOrder: 11
|
m_RootOrder: 11
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using FSM;
|
using FSM;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
using ZXKFramework;
|
using ZXKFramework;
|
||||||
namespace DongWuYiXue.DaoNiaoShu
|
namespace DongWuYiXue.DaoNiaoShu
|
||||||
{
|
{
|
||||||
@ -70,7 +71,7 @@ namespace DongWuYiXue.DaoNiaoShu
|
|||||||
}
|
}
|
||||||
fsm.nextState = true;
|
fsm.nextState = true;
|
||||||
}
|
}
|
||||||
if (!GameManager.Instance.senSor.GetSensor<DaoNiao_Sensor>().isOpen)
|
if (!GameManager.Instance.senSor.GetSensor<DaoNiao_Sensor>().isOpen && isBaGuan)
|
||||||
{
|
{
|
||||||
fsm.StopClip("°Î¹Ü_TimeLine");
|
fsm.StopClip("°Î¹Ü_TimeLine");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -106,7 +106,7 @@ namespace DongWuYiXue.DaoNiaoShu
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (!GameManager.Instance.senSor.GetSensor<DaoNiao_Sensor>().isOpen)
|
if (!GameManager.Instance.senSor.GetSensor<DaoNiao_Sensor>().isOpen && isChaGuan)
|
||||||
{
|
{
|
||||||
fsm.StopClip("²å¹Ü_TimeLine");
|
fsm.StopClip("²å¹Ü_TimeLine");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user