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.

45 lines
823B

  1. using System;
  2. using RobocraftX.GUI.MyGamesScreen;
  3. using Svelto.ECS;
  4. using TechbloxModdingAPI.Engines;
  5. using TechbloxModdingAPI.Utility;
  6. namespace TechbloxModdingAPI.App
  7. {
  8. public class AppEngine : IFactoryEngine
  9. {
  10. public WrappedHandler<MenuEventArgs> EnterMenu;
  11. public WrappedHandler<MenuEventArgs> ExitMenu;
  12. public IEntityFactory Factory { set; private get; }
  13. public string Name => "TechbloxModdingAPIAppEngine";
  14. public bool isRemovable => false;
  15. public EntitiesDB entitiesDB { set; private get; }
  16. public void Dispose()
  17. {
  18. IsInMenu = false;
  19. ExitMenu.Invoke(this, new MenuEventArgs { });
  20. }
  21. public void Ready()
  22. {
  23. IsInMenu = true;
  24. EnterMenu.Invoke(this, new MenuEventArgs { });
  25. }
  26. // app functionality
  27. public bool IsInMenu
  28. {
  29. get;
  30. private set;
  31. } = false;
  32. }
  33. }