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.

28 lines
763B

  1. using GamecraftModdingAPI.Engines;
  2. using Svelto.ECS;
  3. using Techblox.FlyCam;
  4. namespace GamecraftModdingAPI.Players
  5. {
  6. public class FlyCamEngine : IApiEngine
  7. {
  8. public void Ready()
  9. {
  10. }
  11. public EntitiesDB entitiesDB { get; set; }
  12. public void Dispose()
  13. {
  14. }
  15. public string Name => "TechbloxModdingAPIFlyCamEngine";
  16. public bool isRemovable => false;
  17. public OptionalRef<T> GetComponent<T>(uint id) where T : unmanaged, IEntityComponent
  18. {
  19. if (entitiesDB.TryQueryEntitiesAndIndex<T>(id, Techblox.FlyCam.FlyCam.Group, out uint index, out var array))
  20. return new OptionalRef<T>(array, index);
  21. return new OptionalRef<T>();
  22. }
  23. }
  24. }