@awesome-ecs/abstract 0.8.1 → 0.8.2
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.
|
@@ -16,4 +16,8 @@ export interface IdentityComponent<TModel extends IEntityModel> extends ICompone
|
|
|
16
16
|
* It provides a first snapshot of information needed for the successful creation of an Entity instance.
|
|
17
17
|
*/
|
|
18
18
|
readonly model: TModel;
|
|
19
|
+
/**
|
|
20
|
+
* Keeps track when it was the last time the Entity's systems have ran. Useful to calculate the DeltaTime between runs.
|
|
21
|
+
*/
|
|
22
|
+
readonly lastUpdated: Date;
|
|
19
23
|
}
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import { EntityTypeUid, IEntity } from "./entity";
|
|
2
2
|
import { IEntityProxy } from "./entity-proxy";
|
|
3
|
-
/**
|
|
4
|
-
* The Entity Repository internal structure. Holds the Entity as well as LastUpdate time.
|
|
5
|
-
*/
|
|
6
|
-
export interface StoredEntity<TEntity extends IEntity> {
|
|
7
|
-
entity: TEntity;
|
|
8
|
-
lastUpdate: Date;
|
|
9
|
-
}
|
|
10
3
|
/**
|
|
11
4
|
* The Entity Repository is the main storage for keeping track of existing Entities.
|
|
12
5
|
* It provides basic CRUD functionality.
|
|
@@ -14,9 +7,8 @@ export interface StoredEntity<TEntity extends IEntity> {
|
|
|
14
7
|
export interface IEntityRepository {
|
|
15
8
|
has(proxy: IEntityProxy): boolean;
|
|
16
9
|
get<TEntity extends IEntity>(proxy: IEntityProxy): TEntity;
|
|
17
|
-
getWithTime<TEntity extends IEntity>(proxy: IEntityProxy): StoredEntity<TEntity>;
|
|
18
10
|
getAll<TEntity extends IEntity>(entityType: EntityTypeUid): TEntity[];
|
|
19
|
-
listAll():
|
|
11
|
+
listAll(): IEntity[];
|
|
20
12
|
set(entity: IEntity): void;
|
|
21
13
|
delete(proxy: IEntityProxy): void;
|
|
22
14
|
clear(entityType: EntityTypeUid): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awesome-ecs/abstract",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
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": "
|
|
35
|
+
"gitHead": "2243dd084e05965e28caa678e9f4689613902236"
|
|
36
36
|
}
|