using System.Runtime.InteropServices; namespace GFramework.Ecs.Arch.Components; /// /// 位置组件,用于表示实体在二维空间中的坐标位置。 /// /// X轴坐标值 /// Y轴坐标值 [StructLayout(LayoutKind.Sequential)] public struct Position(float x, float y) { /// /// 获取X轴坐标值。 /// public float X { get; set; } = x; /// /// 获取Y轴坐标值。 /// public float Y { get; set; } = y; }