diff options
Diffstat (limited to 'AlienSurvival/Assets/Scripts/Physics/AABBShape.cs')
-rw-r--r-- | AlienSurvival/Assets/Scripts/Physics/AABBShape.cs | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/AlienSurvival/Assets/Scripts/Physics/AABBShape.cs b/AlienSurvival/Assets/Scripts/Physics/AABBShape.cs deleted file mode 100644 index abff597..0000000 --- a/AlienSurvival/Assets/Scripts/Physics/AABBShape.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -#if UNITY_EDITOR -using UnityEditor; -#endif - -[RequireComponent(typeof(TopDownTransform))] -public class AABBShape : ShapeBase -{ - - [Tooltip("中心点(相对此节点的偏移)")] - [SerializeField] private Vector2 m_Centre; - public Vector2 centre { get { return m_Centre;} set { m_Centre = value; } } - - [Tooltip("大小(TopDown空间下)")] - [SerializeField] private Vector2 m_Size; - public Vector2 size { get { return m_Size; } set { m_Size = value; } } - - private TopDownTransform m_TopDownTransform; - private TopDownTransform topdownTransform - { - get - { - if(m_TopDownTransform == null) - { - m_TopDownTransform = GetComponent<TopDownTransform>(); - } - - return m_TopDownTransform; - } - } - -#if UNITY_EDITOR - - private void OnDrawGizmos() - { - Vector3 pos = topdownTransform.GetProjectedPosition(); - Handles.color = Color.green; - Handles.DrawWireCube(pos + new Vector3(m_Centre.x, m_Centre.y, 0), new Vector3(size.x, size.y, 0)); - } - -#endif - -}
\ No newline at end of file |