com.wallstop-studios.unity-helpers 1.0.0-rc6 → 1.0.0-rc7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
private static IEnumerator FunctionAsCoroutine(Action action, float updateRate, bool useJitter, bool waitBefore)
|
|
643
643
|
{
|
|
644
644
|
bool usedJitter = false;
|
|
645
|
-
WaitForSeconds wait =
|
|
645
|
+
WaitForSeconds wait = new(updateRate);
|
|
646
646
|
|
|
647
647
|
while (true)
|
|
648
648
|
{
|
|
@@ -722,7 +722,11 @@
|
|
|
722
722
|
|
|
723
723
|
private static IEnumerator FunctionDelayAsCoroutine(Action action, float delay)
|
|
724
724
|
{
|
|
725
|
-
|
|
725
|
+
float startTime = Time.time;
|
|
726
|
+
while (!HasEnoughTimePassed(startTime, delay))
|
|
727
|
+
{
|
|
728
|
+
yield return null;
|
|
729
|
+
}
|
|
726
730
|
action();
|
|
727
731
|
}
|
|
728
732
|
|