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 GamecraftModdingAPI.Players;
- using Svelto.ECS.EntityStructs;
- using Unity.Mathematics;
-
- namespace GamecraftModdingAPI
- {
- public class FlyCam
- {
- private static FlyCamEngine Engine;
-
- public uint Id { get; }
-
- public FlyCam(uint id) => Id = id;
-
- public unsafe float3 Position
- {
- get => Engine.GetComponent<PositionEntityStruct>(Id).Map(pos => &pos->position);
- set => Engine.GetComponent<PositionEntityStruct>(Id).Map(pos => &pos->position).Set(value);
- }
-
- public static void Init()
- {
- Engine = new FlyCamEngine();
- }
- }
- }
|