chore: 更新仓库 URL (ecs-framework → esengine)

仓库已从 esengine/ecs-framework 重命名为 esengine/esengine
更新所有引用旧 URL 的文件
This commit is contained in:
yhh
2025-12-08 21:23:37 +08:00
parent c3b7250f85
commit 240b165970
350 changed files with 611 additions and 611 deletions

View File

@@ -8,7 +8,7 @@ This guide will help you get started with ECS Framework, from installation to cr
```bash
# Using npm
npm install @esengine/ecs-framework
npm install @esengine/esengine
```
## Initialize Core
@@ -18,7 +18,7 @@ npm install @esengine/ecs-framework
The core of ECS Framework is the `Core` class, a singleton that manages the entire framework lifecycle.
```typescript
import { Core } from '@esengine/ecs-framework'
import { Core } from '@esengine/esengine'
// Method 1: Using config object (recommended)
const core = Core.create({
@@ -102,7 +102,7 @@ See engine integration examples: [Game Engine Integration](#game-engine-integrat
Components are pure data containers that store entity state:
```typescript
import { Component, ECSComponent } from '@esengine/ecs-framework'
import { Component, ECSComponent } from '@esengine/esengine'
// Position component
@ECSComponent('Position')
@@ -151,7 +151,7 @@ class Sprite extends Component {
Systems contain game logic and process entities with specific components. ECS Framework provides Matcher-based entity filtering:
```typescript
import { EntitySystem, Matcher, Time, ECSSystem } from '@esengine/ecs-framework'
import { EntitySystem, Matcher, Time, ECSSystem } from '@esengine/esengine'
// Movement system - handles position and velocity
@ECSSystem('MovementSystem')
@@ -219,7 +219,7 @@ class RenderSystem extends EntitySystem {
Recommended to extend Scene class for custom scenes:
```typescript
import { Scene } from '@esengine/ecs-framework'
import { Scene } from '@esengine/esengine'
// Recommended: Extend Scene for custom scene
class GameScene extends Scene {
@@ -264,7 +264,7 @@ player.addComponent(new Sprite("player.png", 64, 64));
Core has built-in scene management, very simple to use:
```typescript
import { Core, Scene } from '@esengine/ecs-framework';
import { Core, Scene } from '@esengine/esengine';
// Initialize Core
Core.create({ debug: true });
@@ -304,7 +304,7 @@ const player = Core.ecsAPI?.createEntity('Player')
Only for complex server-side applications (MMO game servers, game room systems, etc.):
```typescript
import { Core, WorldManager } from '@esengine/ecs-framework';
import { Core, WorldManager } from '@esengine/esengine';
// Initialize Core
Core.create({ debug: true });
@@ -338,7 +338,7 @@ function gameLoop(deltaTime: number) {
```typescript
import { Stage } from "laya/display/Stage";
import { Laya } from "Laya";
import { Core } from '@esengine/ecs-framework';
import { Core } from '@esengine/esengine';
// Initialize Laya
Laya.init(800, 600).then(() => {
@@ -358,7 +358,7 @@ Laya.init(800, 600).then(() => {
```typescript
import { Component, _decorator } from 'cc';
import { Core } from '@esengine/ecs-framework';
import { Core } from '@esengine/esengine';
const { ccclass } = _decorator;

View File

@@ -18,7 +18,7 @@ In the ECS framework, entities have two lifecycle policies:
### Creating a Persistent Entity
```typescript
import { Scene } from '@esengine/ecs-framework';
import { Scene } from '@esengine/esengine';
class GameScene extends Scene {
protected initialize(): void {
@@ -38,7 +38,7 @@ class GameScene extends Scene {
### Behavior During Scene Transitions
```typescript
import { Core, Scene } from '@esengine/ecs-framework';
import { Core, Scene } from '@esengine/esengine';
// Initial scene
class Level1Scene extends Scene {
@@ -147,7 +147,7 @@ public get lifecyclePolicy(): EEntityLifecyclePolicy
**Example**:
```typescript
import { EEntityLifecyclePolicy } from '@esengine/ecs-framework';
import { EEntityLifecyclePolicy } from '@esengine/esengine';
if (entity.lifecyclePolicy === EEntityLifecyclePolicy.Persistent) {
console.log('Persistent entity');

View File

@@ -28,7 +28,7 @@ SceneManager is suitable for:
This is the simplest and recommended approach, suitable for most applications:
```typescript
import { Core, Scene } from '@esengine/ecs-framework';
import { Core, Scene } from '@esengine/esengine';
// 1. Initialize Core
Core.create({ debug: true });
@@ -78,7 +78,7 @@ update(deltaTime: number) {
If you need more control, you can use SceneManager directly:
```typescript
import { Core, SceneManager, Scene } from '@esengine/ecs-framework';
import { Core, SceneManager, Scene } from '@esengine/esengine';
// Initialize Core
Core.create({ debug: true });

View File

@@ -34,7 +34,7 @@ This document focuses on the usage of the Scene class itself. For detailed infor
**Recommended: Inherit the Scene class to create custom scenes**
```typescript
import { Scene, EntitySystem } from '@esengine/ecs-framework';
import { Scene, EntitySystem } from '@esengine/esengine';
class GameScene extends Scene {
protected initialize(): void {
@@ -81,7 +81,7 @@ class GameScene extends Scene {
### Using Scene Configuration
```typescript
import { ISceneConfig } from '@esengine/ecs-framework';
import { ISceneConfig } from '@esengine/esengine';
const config: ISceneConfig = {
name: "MainGame",

View File

@@ -19,7 +19,7 @@ The framework provides several different system base classes:
The most basic system class, all other systems inherit from it:
```typescript
import { EntitySystem, ECSSystem, Matcher } from '@esengine/ecs-framework';
import { EntitySystem, ECSSystem, Matcher } from '@esengine/esengine';
@ECSSystem('Movement')
class MovementSystem extends EntitySystem {
@@ -586,7 +586,7 @@ class GameScene extends Scene {
Systems implement the `IService` interface and support obtaining other services or systems through dependency injection:
```typescript
import { ECSSystem, Injectable, Inject } from '@esengine/ecs-framework';
import { ECSSystem, Injectable, Inject } from '@esengine/esengine';
@Injectable()
@ECSSystem('Physics')