A stable modding interface between Techblox and mods https://mod.exmods.org/
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.

29 lines
740B

  1. using System.Threading.Tasks;
  2. using Svelto.ECS;
  3. namespace GamecraftModdingAPI.Utility
  4. {
  5. public static class AsyncUtils
  6. {
  7. private static AsyncUtilsEngine gameEngine = new AsyncUtilsEngine();
  8. /// <summary>
  9. /// Waits for entity submission asynchronously.
  10. /// </summary>
  11. public static async Task WaitForSubmission()
  12. {
  13. await gameEngine.WaitForSubmission();
  14. }
  15. public static void Setup(EnginesRoot enginesRoot)
  16. {
  17. gameEngine.Setup(enginesRoot.GenerateEntityFunctions(), enginesRoot.GenerateEntityFactory());
  18. }
  19. public static void Init()
  20. {
  21. GameEngineManager.AddGameEngine(gameEngine);
  22. }
  23. }
  24. }