Files
PrinceOfGlory/Assets/Scripts/Scene_02/AnimalCatchCtr.cs
2026-03-06 19:15:29 +08:00

66 lines
2.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System.Collections;
using System.Collections.Generic;
using BigSpace.Logic;
using BigSpace.XRCore.Event;
using UnityEngine;
public class AnimalCatchCtr : MonoBehaviour
{
////<2F><>ʱ<EFBFBD><CAB1><EFBFBD>
//bool isRun = false;
//float waitTime = 0.3f;
//float runTime = 0;
// Start is called before the first frame update
void Start()
{
//<2F>Ѽ<EFBFBD>Χ<E2B7B6><CEA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
MeshCollider controll = GameObject.Find("LeaveBoxCollider_201").GetComponent<MeshCollider>();
AnimalCatchMgr.Instance.SetMeshCollider(controll);
}
//<2F><><EFBFBD>ֻ<EFBFBD><D6BB>ץ<EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD><EFBFBD><EFBFBD>
public void LeftHandPosCatch(bool isShow)
{
//if (isShow)
//{
// GlobalEventMgr.Dispatch(GameEvent.EventRayStart,1);//1:<3A><><EFBFBD><EFBFBD>
// //Debug.Log("ץȡ<D7A5><C8A1><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
//}
//else
//{
// //Debug.Log("<22>ɿ<EFBFBD><C9BF><EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
// //GlobalEventMgr.Dispatch(GameEvent.EventRayQuadOk, false,1);
//}
}
//右手握拳抓取姿势(由 XRI 手势识别驱动 QuadCatchCtr此回调保留供其他逻辑使用
public void RightHandPosCatch(bool isShow)
{
}
//<2F><><EFBFBD><EFBFBD>ץȡ<D7A5><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public void LeftHandCatchPalmUp(bool isShowFont)
{
//if (isShowFont)
//{
// Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϻ<EFBFBD>ȡ<EFBFBD><C8A1>:"+ AnimalCatchMgr.Instance.leftHandIsCatchObj);
// //if(AnimalCatchMgr.Instance.handIsCatchObj)
// GlobalEventMgr.Dispatch(GameEvent.EventHandShowFont,1, AnimalCatchMgr.Instance.leftAnimalType);
//}
}
//<2F><><EFBFBD><EFBFBD>ץȡ<D7A5><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public void RightHnadCatchPalmUp(bool isShowFont)
{
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);
}
}
}