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.

44 lines
1.1KB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Svelto.ECS;
  7. using GamecraftModdingAPI.Utility;
  8. namespace GamecraftModdingAPI.Events
  9. {
  10. class SimpleEventEmitterEngine : IEventEmitterEngine
  11. {
  12. public string Name { get; set; }
  13. public object type { get; set; }
  14. public IEntityFactory Factory { private get; set; }
  15. public IEntitiesDB entitiesDB { set; private get; }
  16. public void Ready() { }
  17. public void Emit()
  18. {
  19. Factory.BuildEntity<ModEventEntityDescriptor>(ApiExclusiveGroups.eventID++, ApiExclusiveGroups.eventsExclusiveGroup)
  20. .Init(new ModEventEntityStruct
  21. {
  22. type = type
  23. });
  24. }
  25. public SimpleEventEmitterEngine(EventType type, string name)
  26. {
  27. this.type = type;
  28. this.Name = name;
  29. }
  30. public SimpleEventEmitterEngine(object type, string name)
  31. {
  32. this.type = type;
  33. this.Name = name;
  34. }
  35. }
  36. }