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.
|
- using Svelto.ECS;
- using Techblox.FlyCam;
- using TechbloxModdingAPI.Engines;
- using TechbloxModdingAPI.Utility;
-
- namespace TechbloxModdingAPI.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 ref T GetComponent<T>(FlyCam cam) where T : unmanaged, IEntityComponent
- {
- return ref entitiesDB.QueryEntityOrDefault<T>(cam);
- }
-
- public ushort GetSelectedBlock(FlyCam cam)
- {
- var oc = entitiesDB.QueryEntityOptional<EquippedPartStruct>(cam);
- return oc ? (ushort) oc.Get().SelectedDBPartID : ushort.MaxValue;
- }
-
- public byte GetSelectedColor(FlyCam cam)
- {
- var oc = entitiesDB.QueryEntityOptional<EquippedColourStruct>(cam);
- return oc ? oc.Get().indexInPalette : (byte) 255;
- }
- }
- }
|