This commit is contained in:
kridoo
2025-11-14 19:34:36 +08:00
parent de88d2d6a1
commit 5ba318796f
77 changed files with 4244 additions and 11632 deletions

View File

@@ -1,5 +1,3 @@
using BigSpace.Logic;
using BigSpace.XRCore.Event;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@@ -27,14 +25,14 @@ public class GrabItem : MonoBehaviour
float runTime = 0;
//<2F><>ʱ<EFBFBD>ȴ<EFBFBD><C8B4><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>ֵĶ<D6B5><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7>
bool isRun2 = false;
bool isRun2 = false;
float waitTime2 = 1f;
float runTime2 = 0;
private void Awake()
{
m_rig = GetComponent<Rigidbody>();
if (effectHideAndShowCtr == null)
if(effectHideAndShowCtr == null)
effectHideAndShowCtr = GetComponent<EffectHideAndShowCtr>();
m_originParent = transform.parent;
startPosition = this.transform.localPosition;
@@ -45,7 +43,7 @@ public class GrabItem : MonoBehaviour
{
if (isRun)
{
runTime += Time.deltaTime;
if (runTime >= waitTime)
{
@@ -110,14 +108,12 @@ public class GrabItem : MonoBehaviour
{
if (other.gameObject.CompareTag("RightHand"))
{
SceneMgr.Instance.isTrigger = true;
//Debug.Log("Ent<6E><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:"+other.gameObject.name);
//if (m_catch == null)
m_catch = other.GetComponent<CatchManager>();
m_catch = other.GetComponent<CatchManager>();
SetTriggerParameter("DisTrigger");
// GlobalEventMgr.Dispatch(GameEvent.EventRayEnd2);
if (m_catch == null) return;
// Debug.Log("111<31>Ƿ<EFBFBD><C7B7><EFBFBD>ʼ:"+ m_catch.Start);
// Debug.Log("111<31>Ƿ<EFBFBD><C7B7><EFBFBD>ʼ:"+ m_catch.Start);
if (m_catch.Start)
{
isRun = false;
@@ -132,15 +128,6 @@ public class GrabItem : MonoBehaviour
}
}
}
private void OnTriggerExit(Collider other)
{
if (other.gameObject.CompareTag("RightHand"))
{
SceneMgr.Instance.isTrigger = false;
//GlobalEventMgr.Dispatch(GameEvent.EventRayEnd);
}
}
private void OnTriggerStay(Collider other)
{
@@ -148,7 +135,8 @@ public class GrabItem : MonoBehaviour
{
//Debug.Log("Stay<61><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"+ other.gameObject.name);
//if (m_catch == null)
m_catch = other.GetComponent<CatchManager>();
m_catch = other.GetComponent<CatchManager>();
if (m_catch == null) return;
//Debug.Log("222<32>Ƿ<EFBFBD><C7B7><EFBFBD>ʼ:" + m_catch.Start);
if (m_catch.Start)
@@ -175,7 +163,7 @@ public class GrabItem : MonoBehaviour
private void SetStartPosition()
{
this.transform.localRotation = new Quaternion(0, 0, 0, 0);
this.transform.localRotation = new Quaternion(0,0,0,0);
this.transform.localPosition = startPosition;
}
@@ -183,7 +171,7 @@ public class GrabItem : MonoBehaviour
{
if (this.GetComponent<UpDownMovement>() != null)
{
Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD>:" + isMove);
Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD>:"+isMove);
this.GetComponent<UpDownMovement>().isMove = isMove;
}
}