mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 将Init方法统一重命名为Initialize方法以提高一致性 - 修改Architecture类中的组件注册逻辑,优化去重判断 - 更新ECS系统基础类以使用新的初始化接口 - 重构EcsWorld类使用属性自动实现而非私有字段 - 移除过时的EcsUsageExample示例文件 - 更新相关测试类以匹配新的初始化方法命名 - 改进代码注释和文档字符串格式
19 lines
517 B
C#
19 lines
517 B
C#
namespace GFramework.Core.ecs.components;
|
|
|
|
/// <summary>
|
|
/// 速度组件,用于表示实体在二维空间中的运动速度。
|
|
/// </summary>
|
|
/// <param name="x">X轴方向的速度分量</param>
|
|
/// <param name="y">Y轴方向的速度分量</param>
|
|
public struct Velocity(float x, float y)
|
|
{
|
|
/// <summary>
|
|
/// X轴方向的速度分量
|
|
/// </summary>
|
|
public float X { get; set; } = x;
|
|
|
|
/// <summary>
|
|
/// Y轴方向的速度分量
|
|
/// </summary>
|
|
public float Y { get; set; } = y;
|
|
} |