Files
PrinceOfGlory/Assets/Scripts/Leave/LeavePlayLineControll.cs
kridoo 6e91a0c7f0 111
2025-09-15 17:32:08 +08:00

40 lines
940 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LeavePlayLineControll : MonoBehaviour
{
public Animator animator;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerEnter(Collider other)
{
if (other.gameObject.name == "XROriginHands" || other.gameObject.name == "Main Camera")
{
//Debug.Log("调用了这里......");
animator.Play("AreaLine_Orange_On");
}
}
private void OnTriggerExit(Collider other)
{
//Debug.Log("碰到谁了:" + other.gameObject.name);
if (other.gameObject.name == "XROriginHands" || other.gameObject.name == "Main Camera")
{
//Debug.Log("2222调用了这里......");
animator.Play("AreaLine_Orange_Off");
}
}
}