Moar Gamecraft commands!
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.

40 lines
1.2KB

  1. using RobocraftX.GUI.CommandLine;
  2. using RobocraftX.Multiplayer;
  3. using Svelto.Context;
  4. using Svelto.ECS;
  5. using System;
  6. using Unity.Entities;
  7. using RobocraftX;
  8. namespace ExtraCommands
  9. {
  10. class CustomCommandEngine : IQueryingEntitiesEngine, IEngine, IDisposable
  11. {
  12. protected UnityContext<FullGameCompositionRoot> context;
  13. protected EnginesRoot enginesRoot;
  14. protected World physWorld;
  15. protected Action reloadGame;
  16. protected MultiplayerInitParameters multiplayerInitParameters;
  17. public CustomCommandEngine(UnityContext<FullGameCompositionRoot> ctxHolder, EnginesRoot enginesRoot, World physW, Action reloadGame, MultiplayerInitParameters mpParams)
  18. {
  19. this.context = ctxHolder;
  20. this.enginesRoot = enginesRoot;
  21. this.physWorld = physW;
  22. this.reloadGame = reloadGame;
  23. this.multiplayerInitParameters = mpParams;
  24. }
  25. public IEntitiesDB entitiesDB { set; get; }
  26. virtual public void Dispose() { }
  27. // NOTE: Ready() should call uREPL.RuntimeCommands.Register to add the command to the command line
  28. virtual public void Ready() { }
  29. }
  30. }