diff options
| author | chai <chaifix@163.com> | 2022-04-22 19:24:15 +0800 |
|---|---|---|
| committer | chai <chaifix@163.com> | 2022-04-22 19:24:15 +0800 |
| commit | ded822e98e8eda49618d17e53407b0df1896e539 (patch) | |
| tree | d7f09eafe52f7adb948889e459e900c360dbbdec /AlienSurvival/Assets/Scripts/Physics/AABBShape.cs | |
| parent | c7de0419a8924ae7333bcaed39e797d7c9fc1e69 (diff) | |
* rename AlienSurvival project to SurvivalTest
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 |
