From e8dd5d4fd406e6e6b710cbe85309f6870bccc37a Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 3 Nov 2019 18:31:04 -0500 Subject: Remove everything --- .../Scripts/Util/G_Intstring.cs | 131 --------------------- 1 file changed, 131 deletions(-) delete mode 100644 Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Util/G_Intstring.cs (limited to 'Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Util/G_Intstring.cs') diff --git a/Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Util/G_Intstring.cs b/Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Util/G_Intstring.cs deleted file mode 100644 index cb102fe..0000000 --- a/Assets/Packages/Tayx/Graphy - Ultimate Stats Monitor/Scripts/Util/G_Intstring.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* --------------------------------------- - * Author: Started by David Mkrtchyan, modified by Martin Pane (martintayx@gmail.com) (@tayx94) - * Collaborators: Lars Aalbertsen (@Rockylars) - * Project: Graphy - Ultimate Stats Monitor - * Date: 18-May-18 - * Studio: Tayx - * - * This project is released under the MIT license. - * Attribution is not required, but it is always welcomed! - * -------------------------------------*/ - -using UnityEngine; - -namespace Tayx.Graphy.Utils.NumString -{ - public static class G_IntString - { - /* ----- TODO: ---------------------------- - * Try and move the Init to a core method. - * --------------------------------------*/ - - #region Variables -> Private - - /// - /// List of negative ints casted to strings. - /// - private static string[] negativeBuffer = new string[0]; - - /// - /// List of positive ints casted to strings. - /// - private static string[] positiveBuffer = new string[0]; - - #endregion - - #region Properties -> Public - - /// - /// Have the int buffers been initialized? - /// - public static bool Inited - { - get - { - return negativeBuffer.Length > 0 || positiveBuffer.Length > 0; - } - } - - /// - /// The lowest int value of the existing number buffer. - /// - public static int MinValue - { - get - { - return -(negativeBuffer.Length - 1); - } - } - - /// - /// The highest int value of the existing number buffer. - /// - public static int MaxValue - { - get - { - return positiveBuffer.Length - 1; - } - } - - #endregion - - #region Methods -> Public - - /// - /// Initialize the buffers. - /// - /// - /// Lowest negative value allowed. - /// - /// - /// Highest positive value allowed. - /// - public static void Init(int minNegativeValue, int maxPositiveValue) - { - if (minNegativeValue <= 0) - { - int length = Mathf.Abs(minNegativeValue); - negativeBuffer = new string[length]; - for (int i = 0; i < length; i++) - { - negativeBuffer[i] = (-i).ToString(); - } - } - if (maxPositiveValue >= 0) - { - positiveBuffer = new string[maxPositiveValue]; - for (int i = 0; i < maxPositiveValue; i++) - { - positiveBuffer[i] = i.ToString(); - } - } - } - - /// - /// Returns this int as a cached string. - /// - /// - /// The required int. - /// - /// - /// A cached number string. - /// - public static string ToStringNonAlloc(this int value) - { - if (value < 0 && -value < negativeBuffer.Length) - { - return negativeBuffer[-value]; - } - - if (value >= 0 && value < positiveBuffer.Length) - { - return positiveBuffer[value]; - } - - return value.ToString(); - } - - #endregion - } -} -- cgit v1.2.3