Files
XMen/Assets/Scripts/RightHand.cs
2025-07-10 14:49:53 +08:00

26 lines
603 B
C#

using DragonLi.Core;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RightHand : MonoBehaviour
{
// 当手柄进入机枪台触发器范围时
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("TurretRight"))
{
EventDispatcher.TriggerEvent("HandRightTrriger", true);
}
}
// 当手柄离开机枪台触发器范围时
private void OnTriggerExit(Collider other)
{
if (other.CompareTag("TurretRight"))
{
EventDispatcher.TriggerEvent("HandRightTrriger", false);
}
}
}