6f1ef9c84f
* Fixed dependency * Updates to NeoDictionary * Changes to NeoDictionary * Started working on a Git implementation to integrate into Game Engines in the future * Added commit functionality to the git library * New changes * Added select for NeoDictionary.cs * Fixed issue with previous new method * Added a Benchmarking Tool to be used mostly in game engines * Added IndexOf to NeoDictionary.cs * Added new method for BenchmarkUtility.cs * added an instacedobject class * Added a new shuffle method for lists * fixed return type * Added new Changelog generator * Added new Game logic library to assist with game projects * Added Web Project * Added Nuget package configs * Add workflow for publishing game library NuGet package * Add README for OmegaLeo's Helper Library * Updated Website to reflect all libraries * Fixed missing library in Changelog * Added Contributing and Code of Conduct
41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
namespace OmegaLeo.HelperLib.Game.Providers
|
|
{
|
|
#if UNITY_EDITOR || UNITY_STANDALONE
|
|
using UnityEngine;
|
|
|
|
namespace OmegaLeo.HelperLib.DelayedActions
|
|
{
|
|
public class UnityDelayedActionRunner : MonoBehaviour
|
|
{
|
|
private static UnityDelayedActionRunner _instance;
|
|
public static DelayedActionManager Manager { get; private set; }
|
|
|
|
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
|
private static void Initialize()
|
|
{
|
|
if (_instance == null)
|
|
{
|
|
var go = new GameObject("[DelayedActionRunner]");
|
|
_instance = go.AddComponent<UnityDelayedActionRunner>();
|
|
DontDestroyOnLoad(go);
|
|
Manager = new DelayedActionManager();
|
|
}
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
Manager?.Update(Time.deltaTime);
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
if (_instance == this)
|
|
{
|
|
Manager?.CancelAll();
|
|
_instance = null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
} |