From a5f0c8f6b5ee50306a7b94ee8f5610aab160f021 Mon Sep 17 00:00:00 2001 From: YHH <359807859@qq.com> Date: Thu, 14 Aug 2025 18:44:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3fdeb3f9..47ee52cd 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ const scene = new Scene(); Core.setScene(scene); // 定义组件 -@ECSComponent('Position') +@ECSComponent('PositionComponent') class PositionComponent extends Component { public x: number = 0; public y: number = 0; @@ -87,7 +87,7 @@ entity.addComponent(new PositionComponent(100, 100)); entity.addComponent(new VelocityComponent(5, 0)); // 创建系统 -@ECSSystem('Movement') +@ECSSystem('MovementSystem') class MovementSystem extends EntitySystem { constructor() { super(Matcher.all(PositionComponent, VelocityComponent)); @@ -118,20 +118,20 @@ Core.update(deltaTime); import { ECSComponent, ECSSystem } from '@esengine/ecs-framework'; // 组件装饰器 -@ECSComponent('Position') +@ECSComponent('PositionComponent') class PositionComponent extends Component { public x: number = 0; public y: number = 0; } -@ECSComponent('Velocity') +@ECSComponent('VelocityComponent') class VelocityComponent extends Component { public x: number = 0; public y: number = 0; } // 系统装饰器 -@ECSSystem('Movement') +@ECSSystem('MovementSystem') class MovementSystem extends EntitySystem { constructor() { super(Matcher.all(PositionComponent, VelocityComponent)); @@ -151,7 +151,7 @@ class MovementSystem extends EntitySystem { import { Matcher, ECSSystem } from '@esengine/ecs-framework'; // 使用Matcher和EntitySystem进行高效查询 -@ECSSystem('Query') +@ECSSystem('QuerySystem') class QuerySystem extends EntitySystem { constructor() { super(Matcher.all(PositionComponent, VelocityComponent).none(HealthComponent)); @@ -164,7 +164,7 @@ class QuerySystem extends EntitySystem { } // 更复杂的查询条件 -@ECSSystem('Combat') +@ECSSystem('CombatSystem') class CombatSystem extends EntitySystem { constructor() { super(