public void OnDrawGizmosSelected() { var pos = transform.position; var rot = transform.rotation; GizmoExtensions.DrawWireCube(pos + rot * Offset, GetScaledSize(), rot, Color.white); }
static void DrawHandles(Gate gate, GizmoType gizmoType) { Gate gateConnection = gate.Connection; Handles.color = Color.red; //Draw the Collider of the Gate BoxCollider2D gateCollider = gate.GetComponent <BoxCollider2D>(); Handles.DrawWireCube(gate.transform.position, new Vector3(gateCollider.size.x, gateCollider.size.y, 0)); //Draw the player transportation point of the Gate Handles.color = Color.blue; Vector3 gateEntranceOffset = new Vector3(Mathf.Cos((float)gate.RoomEnterDirection * Mathf.Deg2Rad), Mathf.Sin((float)gate.RoomEnterDirection * Mathf.Deg2Rad), 0); Handles.DrawWireCube(gate.transform.position + gateEntranceOffset, Vector3.one); //Draw Gate Names only when in edit mode if (!EditorApplication.isPlaying) { Handles.Label(gate.transform.position + new Vector3(0, 0.5f, 0), gate.gameObject.name); } //Draw arrow from gate to gate destination if (gateConnection != null) { Vector3 offset = new Vector3(gate.transform.position.y < gateConnection.transform.position.y ? 0.5f: -0.5f, gate.transform.position.x < gateConnection.transform.position.x ? 0.5f : -0.5f, 0); GizmoExtensions.DrawGizmoArrow(gate.transform.position + offset, gateConnection.transform.position + offset, 45f, 1f, Color.red); } }
private void OnDrawGizmos() { if (drawGizmos) { GizmoExtensions.DrawWireCircle(transform.position, range, Color.red); } }
void OnDrawGizmos() { Gizmos.color = new Color(0, 1, 1, .5f); foreach (var circle in arenaCircles) { GizmoExtensions.DrawCircle(CirclePos(circle), circle.radius); } }
private void OnDrawGizmos() { if (drawGizmos) { Gizmos.color = Color.white; GizmoExtensions.DrawWireCircle(transform.position, maskRadius, Color.blue); } }
void OnDrawGizmosSelected() { const float shadowScaleConstant = 2; Gizmos.color = new Color(0, 0, 0, .1f); Gizmos.DrawSphere(transform.position, shadowScale * shadowScaleConstant); Gizmos.color = Color.black; GizmoExtensions.DrawCircle(transform.position, shadowScale * shadowScaleConstant); }
void OnDrawGizmosSelected() { Gizmos.color = Color.cyan; foreach (var circle in arenaCircles) { GizmoExtensions.DrawCircle(CirclePos(circle), circle.radius, true); } }
void OnDrawGizmos() { if (!point1 || !anchor1 || !point2 || !anchor2) { return; } GizmoExtensions.DrawBezier(point1.position, anchor1.position, anchor2.position, point2.position); }
void OnDrawGizmos() { Gizmos.color = new Color(1, 1, 0, .2f); GizmoExtensions.DrawCircle(transform.position, notifyDistance); Gizmos.color = new Color(1, 1, 0, .8f); GizmoExtensions.DrawCircle(transform.position, actionDistance); Gizmos.DrawSphere(transform.position + guiPosition, .1f); }
void OnDrawGizmos() { Gizmos.color = Color.blue; GizmoExtensions.DrawCircle(transform.position, attackRadius, 30); Gizmos.color = Color.cyan; Vector3 anglePoint1 = transform.rotation * new Vector3(attackRadius * Mathf.Sin(attackAngle / 2 * Mathf.Deg2Rad), 0f, attackRadius * Mathf.Cos(attackAngle / 2 * Mathf.Deg2Rad)); Vector3 anglePoint2 = transform.rotation * new Vector3(attackRadius * Mathf.Sin(-attackAngle / 2 * Mathf.Deg2Rad), 0f, attackRadius * Mathf.Cos(-attackAngle / 2 * Mathf.Deg2Rad)); Gizmos.DrawLine(transform.position, anglePoint1 + transform.position); Gizmos.DrawLine(transform.position, anglePoint2 + transform.position); }
private void OnDrawGizmos() { if (Controller.debug) { Gizmos.color = Color.blue; Gizmos.DrawWireSphere(transform.position, neightbourRepulsionThreshold); GizmoExtensions.DrawArrow(transform.position, rule1(), Color.red); GizmoExtensions.DrawArrow(transform.position, rule2(), Color.green); GizmoExtensions.DrawArrow(transform.position, rule3(), Color.yellow); } }
private void OnDrawGizmos() { Gizmos.DrawWireCube(bounds.center, bounds.size); if (points != null) { foreach (var vertex in points) { Gizmos.DrawSphere(vertex, size / 50); } } if (regions == null) { return; } Gizmos.color = Color.red; foreach (var vertex in frontier) { Gizmos.DrawWireSphere(vertex, 150); } Gizmos.color = Color.white; foreach (var link in city.GetLinks()) { GizmoExtensions.DrawArrow(link.from.position + Vector3.up * 30, link.to.position + Vector3.up * 30); } /*foreach (var block in blocks) { * foreach (var link in block.links) * { * Gizmos.DrawLine(link.from.position + Vector3.up * 30, link.to.position + Vector3.up * 30); * } * }*/ /* * int c = 0; * foreach (GraphLinked.Cell cell in regions) * { * Gizmos.color = new Color32((byte)((c*64)%255), (byte)((c/64)%255),255,255); * GizmosCell(cell, Vector3.zero); * //foreach (Cell block in cell.children) * { * //GizmosCell(block, Vector3.up * 10); * foreach (GraphLinked.Cell building in cell.children) * { * for (int h = 1; h <= 2; ++h) * { * GizmosCell(building, Vector3.up * 20*h,true); * } * } * } ++c; * }*/ }
void OnDrawGizmosSelected() { Gizmos.color = Color.red; GizmoExtensions.DrawCircle(transform.position, summonMaxRadius, 20); GizmoExtensions.DrawCircle(transform.position, summonMinRadius, 20); }
void OnDrawGizmosSelected() { Gizmos.color = Color.green; GizmoExtensions.DrawCircle(transform.position, minWanderDistance, 20); }
private void OnDrawGizmos() { GizmoExtensions.DrawWireCircle(transform.position, selectionRadius, Color.green); }
public void OnDrawGizmos() { GizmoExtensions.DrawWireCube(transform.position + Vector3.up * (Size.y / 2), Size / 2, Quaternion.identity, Color.white); }
void OnDrawGizmosSelected() { Gizmos.color = Color.red; GizmoExtensions.DrawCircle(transform.position, attackRange, 20); }
void OnDrawGizmos() { Gizmos.color = new Color(1, 1, .3f, .3f); GizmoExtensions.DrawCircle(transform.position, maxAqcuireRange); }