예제 #1
0
 private void DrawGizmos()
 {
     if (GetComponent <PolygonCollider2D>())
     {
         AdvGame.DrawPolygonCollider(transform, GetComponent <PolygonCollider2D>(), new Color(1f, 0.3f, 0f, 0.8f));
     }
     else if (GetComponent <BoxCollider2D>() != null || GetComponent <BoxCollider>() != null)
     {
         AdvGame.DrawCubeCollider(transform, new Color(1f, 0.3f, 0f, 0.8f));
     }
 }
예제 #2
0
 private void DrawGizmos()
 {
     if (this.GetComponent <AC.Char>() == null && drawGizmos)
     {
         if (GetComponent <PolygonCollider2D>())
         {
             AdvGame.DrawPolygonCollider(transform, GetComponent <PolygonCollider2D>(), new Color(1f, 1f, 0f, 0.6f));
         }
         else
         {
             AdvGame.DrawCubeCollider(transform, new Color(1f, 1f, 0f, 0.6f));
         }
     }
 }
예제 #3
0
        protected void DrawGizmos()
        {
            Color gizmoColor = ACEditorPrefs.TriggerGizmoColor;

            PolygonCollider2D polygonCollider2D = GetComponent <PolygonCollider2D>();

            if (polygonCollider2D)
            {
                AdvGame.DrawPolygonCollider(transform, polygonCollider2D, gizmoColor);
            }
            else
            {
                MeshCollider meshCollider = GetComponent <MeshCollider>();
                if (meshCollider)
                {
                    AdvGame.DrawMeshCollider(transform, meshCollider.sharedMesh, gizmoColor);
                }
                else
                {
                    SphereCollider sphereCollider = GetComponent <SphereCollider>();
                    if (sphereCollider)
                    {
                        AdvGame.DrawSphereCollider(transform, sphereCollider, gizmoColor);
                    }
                    else
                    {
                        CapsuleCollider capsuleCollider = GetComponent <CapsuleCollider>();
                        if (capsuleCollider)
                        {
                            AdvGame.DrawCapsule(transform, capsuleCollider.center, capsuleCollider.radius, capsuleCollider.height, gizmoColor);
                        }
                        else
                        {
                            CharacterController characterController = GetComponent <CharacterController>();
                            if (characterController)
                            {
                                AdvGame.DrawCapsule(transform, characterController.center, characterController.radius, characterController.height, gizmoColor);
                            }
                            else
                            {
                                if (GetComponent <BoxCollider>() || GetComponent <BoxCollider2D>())
                                {
                                    AdvGame.DrawCubeCollider(transform, gizmoColor);
                                }
                            }
                        }
                    }
                }
            }
        }
예제 #4
0
        private void DrawGizmos()
        {
            Color gizmoColor = new Color(1f, 0.3f, 0f, 0.8f);

            if (GetComponent <PolygonCollider2D>())
            {
                AdvGame.DrawPolygonCollider(transform, GetComponent <PolygonCollider2D>(), gizmoColor);
            }
            else if (GetComponent <MeshCollider>())
            {
                AdvGame.DrawMeshCollider(transform, GetComponent <MeshCollider>().sharedMesh, gizmoColor);
            }
            else if (GetComponent <BoxCollider2D>() != null || GetComponent <BoxCollider>() != null)
            {
                AdvGame.DrawCubeCollider(transform, gizmoColor);
            }
        }
예제 #5
0
        private void DrawGizmos()
        {
            if (this.GetComponent <AC.Char>() == null && drawGizmos)
            {
                Color gizmoColor = new Color(1f, 1f, 0f, 0.6f);

                if (GetComponent <PolygonCollider2D>())
                {
                    AdvGame.DrawPolygonCollider(transform, GetComponent <PolygonCollider2D>(), gizmoColor);
                }
                else if (GetComponent <MeshCollider>())
                {
                    AdvGame.DrawMeshCollider(transform, GetComponent <MeshCollider>().sharedMesh, gizmoColor);
                }
                else
                {
                    AdvGame.DrawCubeCollider(transform, gizmoColor);
                }
            }
        }
예제 #6
0
        protected void DrawGizmos()
        {
            Color gizmoColor = ACEditorPrefs.TriggerGizmoColor;

            if (GetComponent <PolygonCollider2D>())
            {
                AdvGame.DrawPolygonCollider(transform, GetComponent <PolygonCollider2D>(), gizmoColor);
            }
            else if (GetComponent <MeshCollider>())
            {
                AdvGame.DrawMeshCollider(transform, GetComponent <MeshCollider>().sharedMesh, gizmoColor);
            }
            else if (GetComponent <SphereCollider>())
            {
                AdvGame.DrawSphereCollider(transform, GetComponent <SphereCollider>(), gizmoColor);
            }
            else if (GetComponent <BoxCollider2D>() != null || GetComponent <BoxCollider>() != null)
            {
                AdvGame.DrawCubeCollider(transform, gizmoColor);
            }
        }
예제 #7
0
        protected void DrawGizmos()
        {
            if (this.GetComponent <AC.Char>() == null && drawGizmos)
            {
                Color gizmoColor = ACEditorPrefs.HotspotGizmoColor;

                if (GetComponent <PolygonCollider2D>())
                {
                    AdvGame.DrawPolygonCollider(transform, GetComponent <PolygonCollider2D>(), gizmoColor);
                }
                else if (GetComponent <MeshCollider>())
                {
                    AdvGame.DrawMeshCollider(transform, GetComponent <MeshCollider>().sharedMesh, gizmoColor);
                }
                else if (GetComponent <SphereCollider>())
                {
                    AdvGame.DrawSphereCollider(transform, GetComponent <SphereCollider>(), gizmoColor);
                }
                else
                {
                    AdvGame.DrawCubeCollider(transform, gizmoColor);
                }
            }
        }
 protected void DrawGizmos()
 {
     AdvGame.DrawCubeCollider(transform, new Color(0f, 1f, 1f, 0.8f));
 }
예제 #9
0
 private void DrawGizmos()
 {
     AdvGame.DrawCubeCollider(transform, new Color(1f, 0.3f, 0f, 0.8f));
 }
예제 #10
0
 protected void DrawGizmos()
 {
     AdvGame.DrawCubeCollider(transform, ACEditorPrefs.CollisionGizmoColor);
 }