1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-10 08:15:41 +00:00
X10D/X10D.Unity.Tests/Assets/Tests/DebugExIntegrationTests.cs

41 lines
1.6 KiB
C#
Raw Normal View History

2022-06-01 19:49:09 +01:00
using UnityEngine;
2022-06-01 19:44:15 +01:00
using X10D.Drawing;
using X10D.Unity.Drawing;
using Color = UnityEngine.Color;
namespace X10D.Unity.Tests
{
internal sealed class DebugExIntegrationTests : MonoBehaviour
{
private void Update()
{
DebugEx.DrawLine(Vector3.zero, Vector3.right, Color.red);
DebugEx.DrawLine(Vector3.zero, Vector3.up, Color.green);
DebugEx.DrawLine(Vector3.zero, Vector3.forward, Color.blue);
DebugEx.DrawWireCube(new Vector3(1.5f, 0.5f, 0), Vector3.one * 0.5f, Color.yellow);
2022-06-01 19:44:15 +01:00
DebugEx.DrawRectangle(new Vector2(-1.5f, 0.5f), Vector2.one * -0.5f, Color.cyan);
var circle = new CircleF(0.0f, 0.0f, 0.5f);
DebugEx.DrawCircle(circle, 25, new Vector2(-3.0f, 0.5f), Color.magenta);
var ellipse = new EllipseF(0.0f, 0.0f, 1.0f, 0.5f);
DebugEx.DrawEllipse(ellipse, 25, new Vector2(0.0f, 1.5f), Color.white);
var hexagon = new PolygonF();
2022-06-01 19:49:09 +01:00
hexagon.AddVertex(new Vector2(-0.5f, 0.5f));
hexagon.AddVertex(new Vector2(-0.25f, 1.0f));
hexagon.AddVertex(new Vector2(0.25f, 1.0f));
hexagon.AddVertex(new Vector2(0.5f, 0.5f));
hexagon.AddVertex(new Vector2(0.25f, 0));
hexagon.AddVertex(new Vector2(-0.25f, 0));
2022-06-01 19:44:15 +01:00
DebugEx.DrawPolygon(hexagon, new Vector2(3.0f, 0.0f), Color.white);
var sphere = new Sphere(System.Numerics.Vector3.Zero, 0.5f);
DebugEx.DrawSphere(sphere, 25, new Vector2(0.0f, -1.5f), Color.white);
2022-06-01 19:49:09 +01:00
2022-06-01 19:44:15 +01:00
DebugEx.Assert(true);
}
}
}