summaryrefslogtreecommitdiff
path: root/Assets/Scripts/Physics/PhysicsBox.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Assets/Scripts/Physics/PhysicsBox.cs')
-rw-r--r--Assets/Scripts/Physics/PhysicsBox.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/Assets/Scripts/Physics/PhysicsBox.cs b/Assets/Scripts/Physics/PhysicsBox.cs
new file mode 100644
index 00000000..93f2a45f
--- /dev/null
+++ b/Assets/Scripts/Physics/PhysicsBox.cs
@@ -0,0 +1,32 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class PhysicsBox : PhysicsPrimitive
+{
+ /// <summary>
+ /// 中心点
+ /// </summary>
+ public Vector3 m_Center;
+
+ /// <summary>
+ /// 长宽高
+ /// </summary>
+ public Vector3 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 void OnDrawGizmos()
+ {
+ Vector3 pos = m_Center + transform.position;
+ Gizmos.DrawCube(pos, m_Size);
+ }
+
+ private void Start()
+ {
+ base.OnInit();
+ }
+
+}