TechbloxModdingAPI/GamecraftModdingAPI/Players/FlyCamEngine.cs
NorbiPeti 55b38f1678
Start working on FlyCam and create an overcomplicated struct
Just some native code that's totally unnecessary
2021-04-26 03:12:22 +02:00

28 lines
No EOL
763 B
C#

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>();
}
}
}