@awesome-ecs/abstract 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- import { EntityUid, EntityTypeUid, IEntity } from "./entity";
1
+ import { EntityTypeUid, IEntity } from "./entity";
2
+ import { IEntityProxy } from "./entity-proxy";
2
3
  /**
3
4
  * The Entity Repository internal structure. Holds the Entity as well as LastUpdate time.
4
5
  */
@@ -11,14 +12,12 @@ export interface StoredEntity<TEntity extends IEntity> {
11
12
  * It provides basic CRUD functionality.
12
13
  */
13
14
  export interface IEntityRepository {
14
- has(type: EntityTypeUid, uid: EntityUid): boolean;
15
- get<TEntity extends IEntity>(type: EntityTypeUid, uid: EntityUid): TEntity;
16
- getWithTime<TEntity extends IEntity>(type: EntityTypeUid, uid: EntityUid): StoredEntity<TEntity>;
17
- getAll<TEntity extends IEntity>(type: EntityTypeUid): TEntity[];
15
+ has(proxy: IEntityProxy): boolean;
16
+ get<TEntity extends IEntity>(proxy: IEntityProxy): TEntity;
17
+ getWithTime<TEntity extends IEntity>(proxy: IEntityProxy): StoredEntity<TEntity>;
18
+ getAll<TEntity extends IEntity>(entityType: EntityTypeUid): TEntity[];
18
19
  listAll(): StoredEntity<IEntity>[];
19
20
  set(entity: IEntity): void;
20
- delete(type: EntityTypeUid, uid: EntityUid): void;
21
+ delete(proxy: IEntityProxy): void;
21
22
  clear(entityType: EntityTypeUid): void;
22
- onEntitySetCallback?: (entity: IEntity) => void;
23
- onEntityDeletedCallback?: (entity: IEntity) => void;
24
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesome-ecs/abstract",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "A comprehensive Entity-Component-System (ECS) Architecture implementation. Abstract components.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -32,5 +32,5 @@
32
32
  "url": "https://github.com/andreicojocaru/awesome-ecs/issues"
33
33
  },
34
34
  "homepage": "https://github.com/andreicojocaru/awesome-ecs#readme",
35
- "gitHead": "866b983e2f2bf56d3d6c5646c38c65429a5a7259"
35
+ "gitHead": "bdfe89f29dd58874294814bb95097d26f59c446f"
36
36
  }