From f9b4c56f052be023571f1a452d4386098b543407 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 14 Feb 2022 16:50:07 +0000 Subject: [PATCH] Remove X10D.Unity project from repo --- X10D.Unity/X10D.Unity.csproj | 63 -------------- X10D.Unity/src/GameObjectExtensions.cs | 64 -------------- X10D.Unity/src/TransformExtensions.cs | 37 -------- X10D.Unity/src/Vector3Extensions.cs | 112 ------------------------- 4 files changed, 276 deletions(-) delete mode 100644 X10D.Unity/X10D.Unity.csproj delete mode 100644 X10D.Unity/src/GameObjectExtensions.cs delete mode 100644 X10D.Unity/src/TransformExtensions.cs delete mode 100644 X10D.Unity/src/Vector3Extensions.cs diff --git a/X10D.Unity/X10D.Unity.csproj b/X10D.Unity/X10D.Unity.csproj deleted file mode 100644 index 7caa29d..0000000 --- a/X10D.Unity/X10D.Unity.csproj +++ /dev/null @@ -1,63 +0,0 @@ - - - - netstandard2.0 - 8.0 - Oliver Booth - en - true - https://github.com/oliverbooth/X10D - git - Extension methods on crack. - LICENSE.md - icon.png - - dotnet extension-methods unity - 2.6.0 - true - 2.6.0 - 2.6.0 - 2.6.0 - - - - - True - - - - True - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - - - - - - - - - - True - True - Resource.resx - - - - - - ResXFileCodeGenerator - Resource.Designer.cs - - - - \ No newline at end of file diff --git a/X10D.Unity/src/GameObjectExtensions.cs b/X10D.Unity/src/GameObjectExtensions.cs deleted file mode 100644 index 81d171b..0000000 --- a/X10D.Unity/src/GameObjectExtensions.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using JetBrains.Annotations; -using UnityEngine; - -namespace X10D.Unity -{ - /// - /// Extension methods for . - /// - public static class GameObjectExtensions - { - /// - /// Rotates the component on the current such that is is facing another - /// . - /// - /// The current game object. - /// The target. - /// - /// is null - /// - or - - /// is null. - /// - public static void LookAt([NotNull] this GameObject gameObject, [NotNull] GameObject other) - { - if (gameObject is null) - { - throw new ArgumentNullException(nameof(gameObject)); - } - - if (other is null) - { - throw new ArgumentNullException(nameof(other)); - } - - gameObject.LookAt(other.transform); - } - - /// - /// Rotates the component on the current such that is is facing another - /// . - /// - /// The current game object. - /// The target. - /// - /// is null - /// - or - - /// is null. - /// - public static void LookAt([NotNull] this GameObject gameObject, [NotNull] Transform other) - { - if (gameObject is null) - { - throw new ArgumentNullException(nameof(gameObject)); - } - - if (other is null) - { - throw new ArgumentNullException(nameof(other)); - } - - gameObject.transform.LookAt(other); - } - } -} diff --git a/X10D.Unity/src/TransformExtensions.cs b/X10D.Unity/src/TransformExtensions.cs deleted file mode 100644 index 6cdb7e3..0000000 --- a/X10D.Unity/src/TransformExtensions.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace X10D.Unity -{ - using System; - using JetBrains.Annotations; - using UnityEngine; - - /// - /// Extension methods for . - /// - public static class TransformExtensions - { - /// - /// Rotates the current such that is is facing another . - /// - /// The current transform. - /// The target. - /// - /// is null - /// - or - - /// is null. - /// - public static void LookAt([NotNull] this Transform transform, [NotNull] GameObject other) - { - if (transform is null) - { - throw new ArgumentNullException(nameof(transform)); - } - - if (other is null) - { - throw new ArgumentNullException(nameof(other)); - } - - transform.LookAt(other.transform); - } - } -} diff --git a/X10D.Unity/src/Vector3Extensions.cs b/X10D.Unity/src/Vector3Extensions.cs deleted file mode 100644 index cec8f9e..0000000 --- a/X10D.Unity/src/Vector3Extensions.cs +++ /dev/null @@ -1,112 +0,0 @@ -using UnityEngine; - -namespace X10D.Unity -{ - - /// - /// Extension methods for . - /// - public static class Vector3Extensions - { - /// - /// Rounds a by calling on each of the components. - /// - /// The vector to round. - /// The nearest value. - /// rounded to the nearest . - public static Vector3 Round(this Vector3 vector, float nearest = 1) - { - return new Vector3(vector.x.Round(nearest), vector.y.Round(nearest), vector.z.Round(nearest)); - } - - /// - /// Returns a vector whose Y and Z components match that of a provided vector, and sets the X component to a provided value. - /// - /// The input vector. - /// The new X value. - /// - /// Returns a whose Y and Z components match that of , - /// but with the component set to . - /// - public static Vector3 WithX(this Vector3 vector, float x) - { - return new Vector3(x, vector.y, vector.z); - } - - /// - /// Returns a vector whose Z component matches that of a provided vector, and sets the X and Y components to provided values. - /// - /// The input vector. - /// The new X value. - /// The new Y value. - /// - /// Returns a whose Z component matches that of , - /// but with the and components set to and - /// respectively. - /// - public static Vector3 WithXY(this Vector3 vector, float x, float y) - { - return new Vector3(x, y, vector.z); - } - - /// - /// Returns a vector whose Y component matches that of a provided vector, and sets the X and Z components to provided values. - /// - /// The input vector. - /// The new X value. - /// The new Z value. - /// - /// Returns a whose Y component matches that of , - /// but with the and components set to and - /// respectively. - /// - public static Vector3 WithXZ(this Vector3 vector, float x, float z) - { - return new Vector3(x, vector.y, z); - } - - /// - /// Returns a vector whose X and Z components match that of a provided vector, and sets the Y component to a provided value. - /// - /// The input vector. - /// The new Y value. - /// - /// Returns a whose X and Z components match that of , - /// but with the component set to . - /// - public static Vector3 WithY(this Vector3 vector, float y) - { - return new Vector3(vector.x, y, vector.z); - } - - /// - /// Returns a vector whose X component matches that of a provided vector, and sets the Y and Z components to provided values. - /// - /// The input vector. - /// The new Y value. - /// The new Z value. - /// - /// Returns a whose X component matches that of , - /// but with the and components set to and - /// respectively. - /// - public static Vector3 WithYZ(this Vector3 vector, float y, float z) - { - return new Vector3(vector.x, y, z); - } - - /// - /// Returns a vector whose X and Y components match that of a provided vector, and sets the Z component to a provided value. - /// - /// The input vector. - /// The new Z value. - /// - /// Returns a whose X and Y components match that of , - /// but with the component set to . - /// - public static Vector3 WithZ(this Vector3 vector, float z) - { - return new Vector3(vector.x, vector.y, z); - } - } -}