/// <summary>
 /// Callback to draw gizmos that are pickable and always drawn.
 /// </summary>
 void OnDrawGizmos()
 {
     using (GizmoUtil.With(GizmoColor)) {
         foreach (var collider in GetComponentsInChildren <Collider>())
         {
             GizmoUtil.DrawCollider(collider, Wire);
         }
     }
 }
Exemple #2
0
        /// <summary>
        /// Callback to draw gizmos that are pickable and always drawn.
        /// </summary>
        void OnDrawGizmos()
        {
            var capsuleCollider = GetComponent <CapsuleCollider>();

            if (capsuleCollider == null)
            {
                return;
            }
            using (GizmoUtil.With(Color.red)) {
                GizmoUtil.DrawCapsuleCollider(capsuleCollider);
            }
        }
Exemple #3
0
 /// <summary>
 /// Callback to draw gizmos that are pickable and always drawn.
 /// </summary>
 void OnDrawGizmos()
 {
     if (isActiveAndEnabled)
     {
         using (GizmoUtil.With(HitboxUtil.GetHurtboxColor(Type))) {
             foreach (var collider in GetComponents <Collider>())
             {
                 if (!collider.enabled && collider.gameObject.activeInHierarchy)
                 {
                     continue;
                 }
                 GizmoUtil.DrawCollider(collider);
             }
         }
     }
 }
Exemple #4
0
 /// <summary>
 /// Callback to draw gizmos that are pickable and always drawn.
 /// </summary>
 void OnDrawGizmos()
 {
     if (EditorApplication.isPlayingOrWillChangePlaymode && !IsActive)
     {
         return;
     }
     Gizmos.color = HitboxUtil.GetHitboxColor(Type);
     if (oldCenter_.HasValue)
     {
         GizmoUtil.DrawCapsule(Center, oldCenter_.Value, Radius);
     }
     else
     {
         Gizmos.DrawWireSphere(Center, Radius);
     }
 }
Exemple #5
0
 /// <summary>
 /// Callback to draw gizmos that are pickable and always drawn.
 /// </summary>
 void OnDrawGizmos()
 {
     using (GizmoUtil.With(Color.magenta)) {
         foreach (var platformCollider in GetComponentsInChildren <Collider>())
         {
             if (platformCollider.isTrigger)
             {
                 continue;
             }
             GizmoUtil.DrawCollider(platformCollider);
         }
         if (CheckRegions == null)
         {
             return;
         }
         foreach (var region in CheckRegions)
         {
             GizmoUtil.DrawBox(GetWorldRegion(region));
         }
     }
 }