diff options
author | chai <chaifix@163.com> | 2020-10-14 12:44:29 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2020-10-14 12:44:29 +0800 |
commit | dcaad8044384bce4f4358522108bf9a2481ee4e0 (patch) | |
tree | fb6cf33d05c66356b0c5d533e266aaa341210a3e /Assets/Scripts/Physics/PhysicsBox.cs | |
parent | 4056f06baea18d3c5ae23c4a022fc6ae6b135bb2 (diff) |
*physics
Diffstat (limited to 'Assets/Scripts/Physics/PhysicsBox.cs')
-rw-r--r-- | Assets/Scripts/Physics/PhysicsBox.cs | 32 |
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();
+ }
+
+}
|