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); } } }