| 123456789101112131415161718192021 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- namespace DTYJ
- {
- public class ChuZhanTrigger : MonoBehaviour
- {
- public Action<GameObject> onTriggerEnter;
- private void OnCollisionEnter(Collision collision)
- {
- if (collision.gameObject.layer == LayerMask.NameToLayer("ChengKeDestroy"))
- onTriggerEnter?.Invoke(gameObject);
- }
- //private void OnTriggerEnter(Collider other)
- //{
- //}
- }
- }
|