fix compile error
This commit is contained in:
parent
32b208d1b6
commit
055df4e427
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace NEG.Utils.Timing
|
namespace NEG.Utils.Timing
|
||||||
{
|
{
|
||||||
@ -27,7 +28,7 @@ namespace NEG.Utils.Timing
|
|||||||
/// <returns>Amount of time retrievend</returns>
|
/// <returns>Amount of time retrievend</returns>
|
||||||
public double Retrieve(double maxTime)
|
public double Retrieve(double maxTime)
|
||||||
{
|
{
|
||||||
if(!Double.IsFinite(maxTime))
|
if(!double.IsFinite(maxTime))
|
||||||
{
|
{
|
||||||
double timeRetrieved = time;
|
double timeRetrieved = time;
|
||||||
time = 0;
|
time = 0;
|
||||||
@ -61,7 +62,7 @@ namespace NEG.Utils.Timing
|
|||||||
/// <returns>Amount of warps</returns>
|
/// <returns>Amount of warps</returns>
|
||||||
public int RetrieveAll(double interval, int limit = int.MaxValue)
|
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);
|
result = Math.Clamp(result, 0, limit);
|
||||||
time -= result * interval;
|
time -= result * interval;
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user