|
- using GamecraftModdingAPI.Engines;
- using Svelto.ECS;
- using Techblox.FlyCam;
-
- namespace GamecraftModdingAPI.Players
- {
- public class FlyCamEngine : IApiEngine
- {
- public void Ready()
- {
- }
-
- public EntitiesDB entitiesDB { get; set; }
- public void Dispose()
- {
- }
-
- public string Name => "TechbloxModdingAPIFlyCamEngine";
- public bool isRemovable => false;
-
- public OptionalRef<T> GetComponent<T>(uint id) where T : unmanaged, IEntityComponent
- {
- if (entitiesDB.TryQueryEntitiesAndIndex<T>(id, Techblox.FlyCam.FlyCam.Group, out uint index, out var array))
- return new OptionalRef<T>(array, index);
- return new OptionalRef<T>();
- }
- }
- }
|