25 lines
562 B
C#
25 lines
562 B
C#
using DragonLi.Core;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class LeftHand : MonoBehaviour
|
|
{
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.CompareTag("TurretLeft"))
|
|
{
|
|
EventDispatcher.TriggerEvent("HandLeftTrriger", true);
|
|
}
|
|
}
|
|
|
|
// 当手柄离开机枪台触发器范围时
|
|
private void OnTriggerExit(Collider other)
|
|
{
|
|
if (other.CompareTag("TurretLeft"))
|
|
{
|
|
EventDispatcher.TriggerEvent("HandLeftTrriger", false);
|
|
}
|
|
}
|
|
}
|