@rpgjs/client 5.0.0-alpha.10 → 5.0.0-alpha.12
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.
- package/dist/Game/Map.d.ts +4 -0
- package/dist/Gui/Gui.d.ts +128 -5
- package/dist/RpgClient.d.ts +35 -5
- package/dist/RpgClientEngine.d.ts +3 -0
- package/dist/components/gui/index.d.ts +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index10.js +150 -4
- package/dist/index10.js.map +1 -1
- package/dist/index11.js +20 -7
- package/dist/index11.js.map +1 -1
- package/dist/index12.js +6 -8
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +11 -14
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +8 -100
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +141 -35
- package/dist/index15.js.map +1 -1
- package/dist/index16.js +42 -0
- package/dist/index16.js.map +1 -1
- package/dist/index17.js +48 -7
- package/dist/index17.js.map +1 -1
- package/dist/index18.js +5 -383
- package/dist/index18.js.map +1 -1
- package/dist/index19.js +384 -28
- package/dist/index19.js.map +1 -1
- package/dist/index2.js +32 -13
- package/dist/index2.js.map +1 -1
- package/dist/index20.js +31 -17
- package/dist/index20.js.map +1 -1
- package/dist/index21.js +17 -2413
- package/dist/index21.js.map +1 -1
- package/dist/index22.js +2587 -88
- package/dist/index22.js.map +1 -1
- package/dist/index23.js +108 -103
- package/dist/index23.js.map +1 -1
- package/dist/index29.js +22 -3
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +2 -2
- package/dist/index30.js +1 -318
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +332 -24
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +24 -8
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +4 -4
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +8 -9
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +9 -4400
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +4394 -307
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +307 -165
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +162 -489
- package/dist/index38.js.map +1 -1
- package/dist/index39.js +496 -56
- package/dist/index39.js.map +1 -1
- package/dist/index4.js +2 -2
- package/dist/index40.js +67 -10
- package/dist/index40.js.map +1 -1
- package/dist/index41.js +16 -78
- package/dist/index41.js.map +1 -1
- package/dist/index42.js +96 -0
- package/dist/index42.js.map +1 -0
- package/dist/index9.js +228 -14
- package/dist/index9.js.map +1 -1
- package/dist/presets/faceset.d.ts +30 -0
- package/dist/presets/index.d.ts +1 -0
- package/dist/services/mmorpg.d.ts +1 -1
- package/dist/services/standalone.d.ts +1 -1
- package/package.json +7 -5
- package/src/Game/AnimationManager.ts +1 -0
- package/src/Game/Map.ts +9 -1
- package/src/Game/Object.ts +28 -6
- package/src/Gui/Gui.ts +300 -17
- package/src/RpgClient.ts +36 -5
- package/src/RpgClientEngine.ts +32 -9
- package/src/components/character.ce +11 -9
- package/src/components/gui/box.ce +17 -0
- package/src/components/gui/dialogbox/index.ce +74 -35
- package/src/components/gui/dialogbox/selection.ce +16 -1
- package/src/components/gui/index.ts +3 -4
- package/src/components/scenes/event-layer.ce +6 -0
- package/src/index.ts +3 -1
- package/src/presets/faceset.ts +60 -0
- package/src/presets/index.ts +3 -1
package/dist/index20.js
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { RpgCommonMap } from '@rpgjs/common';
|
|
2
|
+
import { sync, users } from './index19.js';
|
|
3
|
+
import { RpgClientPlayer } from './index33.js';
|
|
4
|
+
import { signal, computed } from 'canvasengine';
|
|
5
|
+
import { RpgClientEvent } from './index34.js';
|
|
6
|
+
import { RpgClientEngine } from './index2.js';
|
|
7
|
+
import { inject } from './index6.js';
|
|
3
8
|
|
|
4
|
-
|
|
9
|
+
var __defProp = Object.defineProperty;
|
|
10
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
11
|
+
var result = void 0 ;
|
|
12
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
13
|
+
if (decorator = decorators[i])
|
|
14
|
+
result = (decorator(target, key, result) ) || result;
|
|
15
|
+
if (result) __defProp(target, key, result);
|
|
16
|
+
return result;
|
|
17
|
+
};
|
|
18
|
+
class RpgClientMap extends RpgCommonMap {
|
|
5
19
|
constructor() {
|
|
6
|
-
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.engine = inject(RpgClientEngine);
|
|
22
|
+
this.players = signal({});
|
|
23
|
+
this.events = signal({});
|
|
24
|
+
this.currentPlayer = computed(() => this.players()[this.engine.playerIdSignal()]);
|
|
7
25
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
this.current().push({
|
|
11
|
-
...params,
|
|
12
|
-
id,
|
|
13
|
-
x: player.x,
|
|
14
|
-
y: player.y,
|
|
15
|
-
onFinish: () => {
|
|
16
|
-
const index = this.current().findIndex((value) => value.id === id);
|
|
17
|
-
this.current().splice(index, 1);
|
|
18
|
-
}
|
|
19
|
-
});
|
|
26
|
+
getCurrentPlayer() {
|
|
27
|
+
return this.currentPlayer();
|
|
20
28
|
}
|
|
21
29
|
}
|
|
30
|
+
__decorateClass([
|
|
31
|
+
users(RpgClientPlayer)
|
|
32
|
+
], RpgClientMap.prototype, "players");
|
|
33
|
+
__decorateClass([
|
|
34
|
+
sync(RpgClientEvent)
|
|
35
|
+
], RpgClientMap.prototype, "events");
|
|
22
36
|
|
|
23
|
-
export {
|
|
37
|
+
export { RpgClientMap };
|
|
24
38
|
//# sourceMappingURL=index20.js.map
|
package/dist/index20.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index20.js","sources":["../src/Game/
|
|
1
|
+
{"version":3,"file":"index20.js","sources":["../src/Game/Map.ts"],"sourcesContent":["import { RpgCommonMap } from \"@rpgjs/common\";\nimport { sync, users } from \"@signe/sync\";\nimport { RpgClientPlayer } from \"./Player\";\nimport { Signal, signal, computed } from \"canvasengine\";\nimport { RpgClientEvent } from \"./Event\";\nimport { RpgClientEngine } from \"../RpgClientEngine\";\nimport { inject } from \"../core/inject\";\n\nexport class RpgClientMap extends RpgCommonMap<RpgClientPlayer> {\n engine: RpgClientEngine = inject(RpgClientEngine)\n @users(RpgClientPlayer) players = signal<Record<string, RpgClientPlayer>>({});\n @sync(RpgClientEvent) events = signal<Record<string, RpgClientEvent>>({});\n currentPlayer = computed(() => this.players()[this.engine.playerIdSignal()!])\n\n getCurrentPlayer() {\n return this.currentPlayer()\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAQO,MAAM,qBAAqB,YAA8B,CAAA;AAAA,EAAzD,WAAA,GAAA;AAAA,IAAA,KAAA,CAAA,GAAA,SAAA,CAAA;AACL,IAAA,IAAA,CAAA,MAAA,GAA0B,OAAO,eAAe,CAAA;AACxB,IAAU,IAAA,CAAA,OAAA,GAAA,MAAA,CAAwC,EAAE,CAAA;AACtD,IAAS,IAAA,CAAA,MAAA,GAAA,MAAA,CAAuC,EAAE,CAAA;AACxE,IAAgB,IAAA,CAAA,aAAA,GAAA,QAAA,CAAS,MAAM,IAAK,CAAA,OAAA,GAAU,IAAK,CAAA,MAAA,CAAO,cAAe,EAAE,CAAC,CAAA;AAAA;AAAA,EAE5E,gBAAmB,GAAA;AACjB,IAAA,OAAO,KAAK,aAAc,EAAA;AAAA;AAE9B;AAP0B,eAAA,CAAA;AAAA,EAAvB,MAAM,eAAe;AAAA,CAAA,EAFX,YAEa,CAAA,SAAA,EAAA,SAAA,CAAA;AACF,eAAA,CAAA;AAAA,EAArB,KAAK,cAAc;AAAA,CAAA,EAHT,YAGW,CAAA,SAAA,EAAA,QAAA,CAAA;;;;"}
|