using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// AABB碰撞盒 /// public class PhysicsBox : PhysicsPrimitive { public override PrimitiveType Type { get { return PrimitiveType.Box; } } [SerializeField] private Vector3 m_Size; public Vector3 Size { get { return m_Size; } } public float Long { get { return m_Size.x; } } public float Wide { get { return m_Size.y; } } public float Height { get { return m_Size.z; } } public bool m_DrawGizmo = true; public void OnDrawGizmos() { if (!m_IsActive || !m_DrawGizmo) return; Vector3 pos = Position; Gizmos.color = m_HintColor; Gizmos.DrawCube(pos, m_Size); } private void Start() { base.OnInit(); } }