Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using System.Runtime.CompilerServices;
- using UnityEngine;
- public class Ledge : MonoBehaviour
- {
- [SerializeField]
- private Vector3 _offset;
- private void OnTriggerEnter(Collider other)
- {
- Debug.Break();
- if (other.CompareTag("LedgeChecker"))
- {
- Player player = other.transform.parent.GetComponent<Player>();
- if (player != null)
- {
- player.GrabLedge(_offset);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement