You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System.Threading.Tasks;
-
- using Svelto.ECS;
-
- namespace GamecraftModdingAPI.Utility
- {
- public static class AsyncUtils
- {
- private static AsyncUtilsEngine gameEngine = new AsyncUtilsEngine();
-
- /// <summary>
- /// Waits for entity submission asynchronously.
- /// Use after placing a block or otherwise creating things in the game to access their properties.
- /// </summary>
- public static async Task WaitForSubmission()
- {
- await gameEngine.WaitForSubmission();
- }
-
- public static async Task WaitForNextFrame()
- {
- await gameEngine.WaitForNextFrame();
- }
-
- public static void Setup(EnginesRoot enginesRoot)
- {
- gameEngine.Setup(enginesRoot.GenerateEntityFunctions(), enginesRoot.GenerateEntityFactory());
- }
-
- public static void Init()
- {
- GameEngineManager.AddGameEngine(gameEngine);
- }
- }
- }
|