From 8b65edb43be0945203633b33d7a62c81ab3f05ce Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 16 Sep 2021 09:52:33 +0800 Subject: +unit effect --- Assets/Scripts/Unit/UnitDetail.cs | 40 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'Assets/Scripts/Unit/UnitDetail.cs') diff --git a/Assets/Scripts/Unit/UnitDetail.cs b/Assets/Scripts/Unit/UnitDetail.cs index bab954c4..03d26fdd 100644 --- a/Assets/Scripts/Unit/UnitDetail.cs +++ b/Assets/Scripts/Unit/UnitDetail.cs @@ -100,6 +100,11 @@ public enum EUnitReferencePoint HitpointLowerBody, HitpointLowerBodyFront, HitpointLowerBodyBack, + + GrabpointChest = 60, // 被抓取的时候的挂点 + GrabpointHead, + GrabpointLeg, + } [Serializable] @@ -112,6 +117,8 @@ public class UnitReferencePointDictionary : SerializableDictionary(); + return m_meshRenderer; + } + } + + + public Vector3 center + { + get + { + return meshRenderer.bounds.center; + } + } + + public UnitDetail() { bones = new UnitBoneDictionary(); foreach(EUnitBone e in Enum.GetValues(typeof(EUnitBone))) @@ -141,4 +170,11 @@ public class UnitDetail : MonoBehaviour return bones.ContainsKey(bone); } + private void OnDrawGizmos() + { + if (!showGizmos) + return; + Gizmos.DrawWireCube(center, new Vector3(snapshotBound, snapshotBound, 0)); + } + } \ No newline at end of file -- cgit v1.1-26-g67d0