mirror of
https://github.com/Xevion/Boids.git
synced 2025-12-06 09:14:25 -06:00
ShapeDraw utility class to split draw logic
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b50106a18d564518ba59ebb42e02f619
|
||||
timeCreated: 1589861330
|
||||
guid: 5a23673acb15433ea9f977712582464f
|
||||
timeCreated: 1591398022
|
||||
35
Boids/Assets/Scripts/ShapeDraw.cs
Normal file
35
Boids/Assets/Scripts/ShapeDraw.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// A simple static utility class that assists with drawing shapes using the <c>LineRenderer</c> class.
|
||||
/// </summary>
|
||||
public class ShapeDraw {
|
||||
/// <summary>
|
||||
/// Draw a Arc aimed straight up with a certain angle width and radius.
|
||||
/// Use <see cref="RotateLineRenderer"/> to point the Arc at a certain direction.
|
||||
/// </summary>
|
||||
/// <param name="lineRenderer">The LineRenderer to draw the Arc upon.</param>
|
||||
/// <param name="angle">Angle of the Arc</param>
|
||||
/// <param name="radius">Radius of the Arc</param>
|
||||
/// <param name="vertexCount">Number of vertexes to be used in the arc, clamp minimum 3 </param>
|
||||
/// <seealso cref="RotateLineRenderer"/>
|
||||
public static void DrawArc(LineRenderer lineRenderer, float angle, float radius, int vertexCount) {
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Draw a Circle with a specific radius and number of vertexes (detail level)
|
||||
/// </summary>
|
||||
/// <param name="lineRenderer"></param>
|
||||
public static void DrawCircle(LineRenderer lineRenderer) {
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="lineRenderer"></param>
|
||||
public static void RotateLineRenderer(LineRenderer lineRenderer) {
|
||||
|
||||
}
|
||||
}
|
||||
3
Boids/Assets/Scripts/ShapeDraw.cs.meta
Normal file
3
Boids/Assets/Scripts/ShapeDraw.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 09004a14b18b4662898d7e1cc0bc6f24
|
||||
timeCreated: 1591398023
|
||||
Reference in New Issue
Block a user