EmuEraGameInstance.cs 762 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System.IO;
  2. using NTERA.Core;
  3. using NTERA.EmuEra.Game;
  4. using NTERA.EmuEra.Game.EraEmu.GameProc;
  5. namespace NTERA.EmuEra
  6. {
  7. public class EmuEraGameInstance : IScriptEngine
  8. {
  9. private Process emuera;
  10. public bool Initialize(IConsole console)
  11. {
  12. emuera = new Process(console);
  13. GlobalStatic.Process = emuera;
  14. GlobalStatic.Console = console;
  15. Program.CMain(Directory.GetCurrentDirectory() + "\\");
  16. return emuera.Initialize();
  17. }
  18. public void Start()
  19. {
  20. emuera.DoScript();
  21. }
  22. public void InputString(string input)
  23. {
  24. emuera.InputString(input);
  25. }
  26. public void InputInteger(long input)
  27. {
  28. emuera.InputInteger(input);
  29. }
  30. public void InputSystemInteger(long input)
  31. {
  32. emuera.InputSystemInteger(input);
  33. }
  34. }
  35. }