void OnDrawGizmosSelected() { // エリアの表示 Color color = new Color(0.7f, 0.9f, 0.2f); GizmoUtility.DrawCircle(transform.position, 3, color); GizmoUtility.DrawCircle(transform.position, radius, color); // オフセットの表示 color = new Color(0.6f, 0.6f, 0.6f); GizmoUtility.DrawCircle(transform.position, radius * m_TargetSize, color); // フォースフィールドの表示 if (m_Force > 0) { color = new Color(0.9f, 0.4f, 0.6f); float val = Mathf.Lerp(m_TargetSize, 1, m_Force); GizmoUtility.DrawCircle(transform.position, radius * val, color); } else if (m_Force < 0) { color = new Color(0.5f, 0.7f, 0.95f); float val = Mathf.Lerp(-m_TargetSize, -1, -m_Force); GizmoUtility.DrawCircle(transform.position, radius * val, color); } }
void OnDrawGizmosSelected() { if (Application.isPlaying && m_IsMoving) { Color gizmoColor = new Color(0.2f, 0.8f, 0); Gizmos.color = gizmoColor; Gizmos.DrawLine(transform.position, transform.TransformPoint(-m_Delay)); GizmoUtility.DrawCircle(transform.position, 10f, gizmoColor); GizmoUtility.DrawCircle(transform.TransformPoint(-m_Delay), 10f, gizmoColor); } }