public override void DrawGizmos(GameObject navMeshOb) { if (navMeshOb != null && navMeshOb.GetComponent <PolygonCollider2D>()) { AdvGame.DrawPolygonCollider(navMeshOb.transform, navMeshOb.GetComponent <PolygonCollider2D>(), Color.white); } }
public virtual void DrawGizmos() { if (GetComponent <PolygonCollider2D>()) { AdvGame.DrawPolygonCollider(transform, GetComponent <PolygonCollider2D>(), Color.white); } }
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)); } }
public override void DrawGizmos(GameObject navMeshOb) { if (navMeshOb != null) { PolygonCollider2D[] polys = navMeshOb.GetComponents <PolygonCollider2D>(); if (polys != null) { for (int i = 0; i < polys.Length; i++) { AdvGame.DrawPolygonCollider(navMeshOb.transform, polys[i], Color.white); } } } }
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)); } } }
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); } } } } } } }
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); } }
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); } } }
public override void DrawGizmos(GameObject navMeshOb) { if (navMeshOb != null) { Color gizmoColour = Color.white; if (navMeshOb.GetComponent <NavigationMesh>()) { gizmoColour = navMeshOb.GetComponent <NavigationMesh>().gizmoColour; } PolygonCollider2D[] polys = navMeshOb.GetComponents <PolygonCollider2D>(); if (polys != null) { for (int i = 0; i < polys.Length; i++) { AdvGame.DrawPolygonCollider(navMeshOb.transform, polys[i], gizmoColour); } } } }
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); } }
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); } } }