提交S2替换
This commit is contained in:
@@ -273,6 +273,7 @@ MonoBehaviour:
|
||||
serializedVersion: 2
|
||||
m_Bits: 512
|
||||
readyGracePeriod: 1
|
||||
cam: {fileID: 1078507557}
|
||||
--- !u!114 &458035500
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -375,6 +376,12 @@ GameObject:
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2110811358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!20 &1078507557 stripped
|
||||
Camera:
|
||||
m_CorrespondingSourceObject: {fileID: 613527469356441082, guid: 2550bc73eb1c7e94ba6e0097c91765ee,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2110811358}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!114 &1566885737 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 8351830640023754798, guid: 2550bc73eb1c7e94ba6e0097c91765ee,
|
||||
|
||||
@@ -55,6 +55,7 @@ public class AnimalCatchCtr : MonoBehaviour
|
||||
{
|
||||
if (isShowFont)
|
||||
{
|
||||
Debug.Log("右手面向玩家检测到");
|
||||
Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϻ<EFBFBD>ȡ<EFBFBD><C8A1>:" + AnimalCatchMgr.Instance.rightHandIsCatchObj);
|
||||
//if(AnimalCatchMgr.Instance.handIsCatchObj)
|
||||
GlobalEventMgr.Dispatch(GameEvent.EventHandShowFont,2, AnimalCatchMgr.Instance.rightAnimalType);
|
||||
|
||||
@@ -16,8 +16,8 @@ MonoBehaviour:
|
||||
m_RelativeOrientation:
|
||||
m_UserConditions:
|
||||
- m_HandAxis: 2
|
||||
m_AlignmentCondition: 1
|
||||
m_ReferenceDirection: 0
|
||||
m_AlignmentCondition: 2
|
||||
m_ReferenceDirection: 1
|
||||
m_AngleTolerance: 60
|
||||
m_IgnorePositionY: 0
|
||||
m_TargetConditions: []
|
||||
|
||||
@@ -16,8 +16,8 @@ MonoBehaviour:
|
||||
m_RelativeOrientation:
|
||||
m_UserConditions:
|
||||
- m_HandAxis: 0
|
||||
m_AlignmentCondition: 0
|
||||
m_ReferenceDirection: 0
|
||||
m_AlignmentCondition: 2
|
||||
m_ReferenceDirection: 1
|
||||
m_AngleTolerance: 60
|
||||
m_IgnorePositionY: 0
|
||||
m_TargetConditions: []
|
||||
|
||||
@@ -11,13 +11,19 @@ public class QuadCatchCtr : MonoBehaviour
|
||||
|
||||
[Tooltip("张开手丢失后保持就绪的宽限时间(秒),避免手势过渡时漏判")]
|
||||
[SerializeField] private float readyGracePeriod = 0.3f;
|
||||
|
||||
public Camera cam;
|
||||
private bool m_isReady = false;
|
||||
private bool m_isCatching = false;
|
||||
private Coroutine m_graceCoroutine;
|
||||
|
||||
// ── 张开手 StaticHandGesture ────────────────────────────────
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (cam == null) cam = Camera.main;
|
||||
|
||||
}
|
||||
|
||||
public void OnOpenHandDetected()
|
||||
{
|
||||
// 取消正在倒计时的宽限期
|
||||
@@ -26,6 +32,7 @@ public class QuadCatchCtr : MonoBehaviour
|
||||
StopCoroutine(m_graceCoroutine);
|
||||
m_graceCoroutine = null;
|
||||
}
|
||||
Debug.Log("张开手检测到");
|
||||
m_isReady = true;
|
||||
}
|
||||
|
||||
@@ -47,19 +54,22 @@ public class QuadCatchCtr : MonoBehaviour
|
||||
|
||||
public void OnFistDetected()
|
||||
{
|
||||
Debug.Log("握拳面向字检测到");
|
||||
if (!m_isReady || m_isCatching) return;
|
||||
|
||||
Debug.Log("摄像机没找到");
|
||||
// 相机视线射线验证
|
||||
Camera cam = Camera.main;
|
||||
|
||||
Ray ray = new Ray(cam.transform.position, cam.transform.forward);
|
||||
|
||||
if (!Physics.Raycast(ray, out RaycastHit hit, rayLength, detectionLayer))
|
||||
return;
|
||||
|
||||
string hitName = hit.collider.gameObject.name;
|
||||
Debug.Log("抓取到了文字的名称为11111" + hitName);
|
||||
if (hitName.Length < 5 || hitName.Substring(0, 4) != "Quad") return;
|
||||
Debug.Log("抓取到了文字的版块为222222:" + hitName);
|
||||
if (!int.TryParse(hitName.Substring(4), out int fontIndex)) return;
|
||||
|
||||
Debug.Log("抓取到了文字");
|
||||
m_isCatching = true;
|
||||
GlobalEventMgr.Dispatch(GameEvent.EventRayQuadOk, true, 2, fontIndex);
|
||||
}
|
||||
|
||||
@@ -655,7 +655,7 @@ MonoBehaviour:
|
||||
isRemovedFromBuildSettings: 1
|
||||
- sceneGUID: a2e91da34847ebb4ebb028809f0ee25b
|
||||
scenePath: Assets/Samples/YOMOV SDK Core/1.3.5/YOMOV SDK Demo/Initialization/ClientInitialization.unity
|
||||
lastFileWriteTime: 134172678008339995
|
||||
lastFileWriteTime: 134172692268462512
|
||||
acts: []
|
||||
isDirty: 0
|
||||
isRemovedFromBuildSettings: 0
|
||||
@@ -740,7 +740,7 @@ MonoBehaviour:
|
||||
isRemovedFromBuildSettings: 0
|
||||
- sceneGUID: 8eaab09c0bef06b44ab38fbc9851bc95
|
||||
scenePath: Assets/Scenes/Scene_02.unity
|
||||
lastFileWriteTime: 134170956534161548
|
||||
lastFileWriteTime: 134172678906998288
|
||||
acts:
|
||||
- id: 2a0a8974-d8f9-4afd-83f0-a37318d64d20
|
||||
name: Scene_02 Act01
|
||||
|
||||
@@ -21,7 +21,7 @@ MonoBehaviour:
|
||||
isRead: 0
|
||||
details:
|
||||
tag: 6666dc2438b04e64b863e52fd4d16e97
|
||||
- id: 6f1cfafb-0952-4762-a8e9-704a779a56b0
|
||||
- id: 851a6d9b-d361-46ee-8238-6bc92e2f0009
|
||||
type: 1
|
||||
source: 11
|
||||
title: Best Path
|
||||
|
||||
Reference in New Issue
Block a user