using System.Collections; using System.Collections.Generic; using UnityEngine; [RequireComponent(typeof(Collider))] public class PutDownBoxManager : MonoBehaviour { private static PutDownBoxManager _putDownBoxManager; public static PutDownBoxManager Instance { get { if (_putDownBoxManager == null) { Debug.LogWarning("未实例化PutDownBoxManager"); } return _putDownBoxManager; } } private void Awake() { _putDownBoxManager = this; _bounds = this.GetComponent().bounds; } private Bounds _bounds; public bool TestBounds(Vector3 pos) { if (_bounds.Contains(pos)) { return true; } return false; } }