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.cs82
1 files changed, 0 insertions, 82 deletions
diff --git a/Assets/Scripts/Physics/PhysicsBox.cs b/Assets/Scripts/Physics/PhysicsBox.cs
deleted file mode 100644
index f8b4fee4..00000000
--- a/Assets/Scripts/Physics/PhysicsBox.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-/// <summary>
-/// AABB碰撞盒
-/// </summary>
-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.z; } }
- public float Height { get { return m_Size.y; } }
-
- public bool m_DrawGizmo = true;
-
- public float Top
- {
- get
- {
- return Position.y + Height / 2f;
- }
- }
-
- public float Left
- {
- get
- {
- return Position.x - Long / 2f;
- }
- }
-
- public float Right
- {
- get
- {
- return Position.x + Long / 2f;
- }
- }
-
- public float Bottom
- {
- get
- {
- return Position.y - Height / 2f;
- }
- }
-
- public void OnDrawGizmos()
- {
- if (!m_IsActive || !m_DrawGizmo)
- return;
- Vector3 pos = Position;
- Gizmos.color = m_HintColor;
- Gizmos.DrawCube(pos, m_Size);
- //Gizmos.color = Color.blue;
- //Gizmos.DrawSphere(pos, 0.1f);
- }
-
- private void Start()
- {
- base.OnInit();
- }
-
-}