better-ui-manager #2

Merged
BitterSmile merged 25 commits from better-ui-manager into main 2023-09-02 14:34:16 +02:00
Showing only changes of commit 055df4e427 - Show all commits

View File

@ -1,4 +1,5 @@
using System;
using UnityEngine;
namespace NEG.Utils.Timing
{
@ -27,7 +28,7 @@ namespace NEG.Utils.Timing
/// <returns>Amount of time retrievend</returns>
public double Retrieve(double maxTime)
{
if(!Double.IsFinite(maxTime))
if(!double.IsFinite(maxTime))
{
double timeRetrieved = time;
time = 0;
@ -61,7 +62,7 @@ namespace NEG.Utils.Timing
/// <returns>Amount of warps</returns>
public int RetrieveAll(double interval, int limit = int.MaxValue)
{
int result = Mathf.FloorToInt(time / interval);
int result = Mathf.FloorToInt((float)(time / interval));
result = Math.Clamp(result, 0, limit);
time -= result * interval;
return result;