using UnityEngine; using System.Threading; using System.Threading.Tasks; public static class Base { public const float Threshold = 0.01f; public static float ClampAngle(float lfAngle, float lfMin, float lfMax) { if (lfAngle < -360f) lfAngle += 360f; if (lfAngle > 360f) lfAngle -= 360f; return Mathf.Clamp(lfAngle, lfMin, lfMax); } } public static class Tasks { public static async Task Delay(float delay, CancellationToken cancellationToken = default) { await Task.Delay((int)(delay * 1000f), cancellationToken); return Application.isPlaying; }//Delay() end }//class end