@rpgjs/server 3.0.0-beta.2 → 3.0.0-beta.5
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/lib/Game/Map.d.ts +87 -8
- package/lib/Game/Map.js +105 -10
- package/lib/Game/Map.js.map +1 -1
- package/lib/Player/BattleManager.d.ts +1 -1
- package/lib/Player/BattleManager.js.map +1 -1
- package/lib/Player/ElementManager.d.ts +1 -1
- package/lib/Player/GuiManager.d.ts +46 -0
- package/lib/Player/GuiManager.js +57 -0
- package/lib/Player/GuiManager.js.map +1 -1
- package/lib/Player/MoveManager.d.ts +5 -5
- package/lib/Player/MoveManager.js +6 -12
- package/lib/Player/MoveManager.js.map +1 -1
- package/lib/Player/Player.d.ts +98 -38
- package/lib/Player/Player.js +127 -43
- package/lib/Player/Player.js.map +1 -1
- package/lib/Query.d.ts +3 -0
- package/lib/Query.js +4 -5
- package/lib/Query.js.map +1 -1
- package/lib/RpgServer.d.ts +59 -4
- package/lib/Scenes/Map.d.ts +31 -1
- package/lib/Scenes/Map.js +54 -13
- package/lib/Scenes/Map.js.map +1 -1
- package/lib/decorators/map.d.ts +4 -5
- package/lib/decorators/map.js +4 -0
- package/lib/decorators/map.js.map +1 -1
- package/lib/entry-point.d.ts +1 -0
- package/lib/entry-point.js +6 -2
- package/lib/entry-point.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/server.d.ts +47 -3
- package/lib/server.js +99 -14
- package/lib/server.js.map +1 -1
- package/lib/workers/move.d.ts +2 -0
- package/lib/workers/move.js +8 -0
- package/lib/workers/move.js.map +1 -0
- package/package.json +6 -5
package/lib/Game/Map.d.ts
CHANGED
|
@@ -1,32 +1,112 @@
|
|
|
1
|
-
import { RpgCommonMap } from '@rpgjs/common';
|
|
1
|
+
import { RpgCommonMap, RpgShape } from '@rpgjs/common';
|
|
2
2
|
import * as Kompute from 'kompute/build/Kompute';
|
|
3
3
|
import { EventOptions } from '../decorators/event';
|
|
4
4
|
import { EventMode, RpgEvent } from '../Event';
|
|
5
5
|
import { RpgPlayer } from '../Player/Player';
|
|
6
|
-
|
|
6
|
+
import { RpgServerEngine } from '../server';
|
|
7
|
+
export declare type EventPosOption = {
|
|
7
8
|
x: number;
|
|
8
9
|
y: number;
|
|
10
|
+
z?: number;
|
|
9
11
|
event: EventOptions;
|
|
10
|
-
}
|
|
12
|
+
};
|
|
13
|
+
export declare type EventOption = EventPosOption | EventOptions;
|
|
11
14
|
export declare class RpgMap extends RpgCommonMap {
|
|
12
15
|
private _server;
|
|
13
16
|
_events: EventOption[];
|
|
14
|
-
|
|
17
|
+
/**
|
|
18
|
+
* @title map id
|
|
19
|
+
* @readonly
|
|
20
|
+
* @prop {string} [id]
|
|
21
|
+
* @memberof Map
|
|
22
|
+
* */
|
|
23
|
+
readonly id: string;
|
|
15
24
|
file: any;
|
|
25
|
+
/**
|
|
26
|
+
* @title event list
|
|
27
|
+
* @prop { { [eventId: string]: RpgEvent } } [events]
|
|
28
|
+
* @memberof Map
|
|
29
|
+
* */
|
|
16
30
|
events: {
|
|
17
31
|
[eventId: string]: RpgEvent;
|
|
18
32
|
};
|
|
19
33
|
kWorld: Kompute;
|
|
20
34
|
entityManager: any;
|
|
21
|
-
constructor(_server:
|
|
35
|
+
constructor(_server: RpgServerEngine);
|
|
22
36
|
load(): Promise<void>;
|
|
23
37
|
get game(): any;
|
|
24
38
|
onLoad(): void;
|
|
25
39
|
onJoin(player: RpgPlayer): void;
|
|
26
40
|
onLeave(player: RpgPlayer): void;
|
|
27
41
|
autoLoadEvent(): void;
|
|
28
|
-
|
|
29
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Edit a tile on the map. All players on the map will see the modified tile
|
|
44
|
+
*
|
|
45
|
+
*
|
|
46
|
+
* @title Change Tile in map
|
|
47
|
+
* @since 3.0.0-beta.4
|
|
48
|
+
* @method map.setTile(x,y,layer,tileInfo)
|
|
49
|
+
* @param {number} x Position X
|
|
50
|
+
* @param {number} y Position Y
|
|
51
|
+
* @param {string | ((layer: any) => boolean)} layer Name of the layer where you want to put a tile. OYou can also put a function that will act as a filter. The first parameter is the layer and you return a boolean to indicate if you modify the tile of this layer or not
|
|
52
|
+
* @param {object} tileInfo Object with the following properties:
|
|
53
|
+
* - {number} gid: The tile number in tileset (from 1)
|
|
54
|
+
* - {object} properties Property of the tile. You own object. To set a collision, set the `collision:true` property
|
|
55
|
+
* @example
|
|
56
|
+
* ```ts
|
|
57
|
+
* map.setTile(15, 18, 'mylayer', { gid: 2 })
|
|
58
|
+
* ```
|
|
59
|
+
* @returns {void}
|
|
60
|
+
* @memberof Map
|
|
61
|
+
*/
|
|
62
|
+
setTile(x: number, y: number, layerFilter: string | ((layer: any) => boolean), tileInfo: {
|
|
63
|
+
gid: number;
|
|
64
|
+
properties?: object;
|
|
65
|
+
}): any;
|
|
66
|
+
getEventShape(eventName: string): RpgShape | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Dynamically create an event in Shared mode
|
|
69
|
+
*
|
|
70
|
+
* ```ts
|
|
71
|
+
* @EventData({
|
|
72
|
+
* name: 'EV-1'
|
|
73
|
+
* })
|
|
74
|
+
* class MyEvent extends RpgEvent {
|
|
75
|
+
* onAction() {
|
|
76
|
+
* console.log('ok')
|
|
77
|
+
* }
|
|
78
|
+
* }
|
|
79
|
+
*
|
|
80
|
+
* map.createDynamicEvent({
|
|
81
|
+
* x: 100,
|
|
82
|
+
* y: 100,
|
|
83
|
+
* event: MyEvent
|
|
84
|
+
* })
|
|
85
|
+
* ```
|
|
86
|
+
*
|
|
87
|
+
* You can also put an array of objects to create several events at once
|
|
88
|
+
*
|
|
89
|
+
* @title Create Dynamic Event
|
|
90
|
+
* @since 3.0.0-beta.4
|
|
91
|
+
* @method map.createDynamicEvent(eventObj|eventObj[])
|
|
92
|
+
* @param { { x: number, y: number, z?: number, event: eventClass } } eventsList
|
|
93
|
+
* @returns { { [eventId: string]: RpgEvent } }
|
|
94
|
+
* @memberof Map
|
|
95
|
+
*/
|
|
96
|
+
createDynamicEvent(eventsList: EventPosOption | EventPosOption[]): {
|
|
97
|
+
[eventId: string]: RpgEvent;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Removes an event from the map. Returns false if the event is not found
|
|
101
|
+
* @title Remove Event
|
|
102
|
+
* @since 3.0.0-beta.4
|
|
103
|
+
* @method map.removeEvent(eventId)
|
|
104
|
+
* @param {string} eventId Event Name
|
|
105
|
+
* @returns {boolean}
|
|
106
|
+
* @memberof Map
|
|
107
|
+
*/
|
|
108
|
+
removeEvent(eventId: string): boolean;
|
|
109
|
+
createEvent(obj: EventPosOption, mode: EventMode, shape?: any): RpgEvent | null;
|
|
30
110
|
createEvents(eventsList: EventOption[], mode: EventMode): {
|
|
31
111
|
[eventId: string]: RpgEvent;
|
|
32
112
|
};
|
|
@@ -37,4 +117,3 @@ export interface RpgMap {
|
|
|
37
117
|
sounds: string[];
|
|
38
118
|
$setSchema: (schema: any) => void;
|
|
39
119
|
}
|
|
40
|
-
export {};
|
package/lib/Game/Map.js
CHANGED
|
@@ -72,6 +72,11 @@ class RpgMap extends common_1.RpgCommonMap {
|
|
|
72
72
|
constructor(_server) {
|
|
73
73
|
super();
|
|
74
74
|
this._server = _server;
|
|
75
|
+
/**
|
|
76
|
+
* @title event list
|
|
77
|
+
* @prop { { [eventId: string]: RpgEvent } } [events]
|
|
78
|
+
* @memberof Map
|
|
79
|
+
* */
|
|
75
80
|
this.events = {};
|
|
76
81
|
this.entityManager = new YUKA.EntityManager();
|
|
77
82
|
}
|
|
@@ -79,20 +84,19 @@ class RpgMap extends common_1.RpgCommonMap {
|
|
|
79
84
|
const _super = Object.create(null, {
|
|
80
85
|
load: { get: () => super.load }
|
|
81
86
|
});
|
|
87
|
+
var _a;
|
|
82
88
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
89
|
if (common_1.RpgCommonMap.buffer.has(this.id)) {
|
|
84
90
|
return;
|
|
85
91
|
}
|
|
86
92
|
const data = yield this.parseFile();
|
|
87
93
|
_super.load.call(this, data);
|
|
94
|
+
(_a = this._server.workers) === null || _a === void 0 ? void 0 : _a.call('loadMap', {
|
|
95
|
+
id: this.id,
|
|
96
|
+
data
|
|
97
|
+
});
|
|
88
98
|
common_1.RpgCommonMap.buffer.set(this.id, this);
|
|
89
|
-
|
|
90
|
-
this.events = this.createEvents(this._events, Event_1.EventMode.Shared);
|
|
91
|
-
// TODO
|
|
92
|
-
// this.autoLoadEvent()
|
|
93
|
-
for (let key in this.events) {
|
|
94
|
-
this.events[key].execMethod('onInit');
|
|
95
|
-
}
|
|
99
|
+
this.createDynamicEvent(this._events);
|
|
96
100
|
this.onLoad();
|
|
97
101
|
});
|
|
98
102
|
}
|
|
@@ -107,6 +111,12 @@ class RpgMap extends common_1.RpgCommonMap {
|
|
|
107
111
|
player.stopBehavior();
|
|
108
112
|
this.entityManager.remove(player.steerable);
|
|
109
113
|
this.getShapes().forEach(shape => shape.out(player));
|
|
114
|
+
const events = Object.values(this.game.world.getObjectsOfGroup(this.id, player));
|
|
115
|
+
for (let event of events) {
|
|
116
|
+
player.getShapes().forEach(shape => shape.out(event));
|
|
117
|
+
event.getShapes().forEach(shape => shape.out(player));
|
|
118
|
+
}
|
|
119
|
+
this.grid.clearObjectInCells(player.id);
|
|
110
120
|
}
|
|
111
121
|
autoLoadEvent() {
|
|
112
122
|
this.getShapes().forEach(shape => {
|
|
@@ -130,19 +140,104 @@ class RpgMap extends common_1.RpgCommonMap {
|
|
|
130
140
|
}
|
|
131
141
|
});
|
|
132
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Edit a tile on the map. All players on the map will see the modified tile
|
|
145
|
+
*
|
|
146
|
+
*
|
|
147
|
+
* @title Change Tile in map
|
|
148
|
+
* @since 3.0.0-beta.4
|
|
149
|
+
* @method map.setTile(x,y,layer,tileInfo)
|
|
150
|
+
* @param {number} x Position X
|
|
151
|
+
* @param {number} y Position Y
|
|
152
|
+
* @param {string | ((layer: any) => boolean)} layer Name of the layer where you want to put a tile. OYou can also put a function that will act as a filter. The first parameter is the layer and you return a boolean to indicate if you modify the tile of this layer or not
|
|
153
|
+
* @param {object} tileInfo Object with the following properties:
|
|
154
|
+
* - {number} gid: The tile number in tileset (from 1)
|
|
155
|
+
* - {object} properties Property of the tile. You own object. To set a collision, set the `collision:true` property
|
|
156
|
+
* @example
|
|
157
|
+
* ```ts
|
|
158
|
+
* map.setTile(15, 18, 'mylayer', { gid: 2 })
|
|
159
|
+
* ```
|
|
160
|
+
* @returns {void}
|
|
161
|
+
* @memberof Map
|
|
162
|
+
*/
|
|
163
|
+
setTile(x, y, layerFilter, tileInfo) {
|
|
164
|
+
const tiles = super.setTile(x, y, layerFilter, tileInfo);
|
|
165
|
+
const players = Object.values(this['users']);
|
|
166
|
+
for (let player of players) {
|
|
167
|
+
player.emit('changeTile', tiles);
|
|
168
|
+
}
|
|
169
|
+
return tiles;
|
|
170
|
+
}
|
|
133
171
|
// TODO: return type
|
|
134
172
|
getEventShape(eventName) {
|
|
135
173
|
return this.getShapes().find(shape => shape.name == eventName);
|
|
136
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Dynamically create an event in Shared mode
|
|
177
|
+
*
|
|
178
|
+
* ```ts
|
|
179
|
+
* @EventData({
|
|
180
|
+
* name: 'EV-1'
|
|
181
|
+
* })
|
|
182
|
+
* class MyEvent extends RpgEvent {
|
|
183
|
+
* onAction() {
|
|
184
|
+
* console.log('ok')
|
|
185
|
+
* }
|
|
186
|
+
* }
|
|
187
|
+
*
|
|
188
|
+
* map.createDynamicEvent({
|
|
189
|
+
* x: 100,
|
|
190
|
+
* y: 100,
|
|
191
|
+
* event: MyEvent
|
|
192
|
+
* })
|
|
193
|
+
* ```
|
|
194
|
+
*
|
|
195
|
+
* You can also put an array of objects to create several events at once
|
|
196
|
+
*
|
|
197
|
+
* @title Create Dynamic Event
|
|
198
|
+
* @since 3.0.0-beta.4
|
|
199
|
+
* @method map.createDynamicEvent(eventObj|eventObj[])
|
|
200
|
+
* @param { { x: number, y: number, z?: number, event: eventClass } } eventsList
|
|
201
|
+
* @returns { { [eventId: string]: RpgEvent } }
|
|
202
|
+
* @memberof Map
|
|
203
|
+
*/
|
|
204
|
+
createDynamicEvent(eventsList) {
|
|
205
|
+
if (!eventsList)
|
|
206
|
+
return {};
|
|
207
|
+
if (!common_1.Utils.isArray(eventsList)) {
|
|
208
|
+
eventsList = [eventsList];
|
|
209
|
+
}
|
|
210
|
+
const events = this.createEvents(eventsList, Event_1.EventMode.Shared);
|
|
211
|
+
for (let key in events) {
|
|
212
|
+
this.events[key] = events[key];
|
|
213
|
+
this.events[key].execMethod('onInit');
|
|
214
|
+
}
|
|
215
|
+
return events;
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Removes an event from the map. Returns false if the event is not found
|
|
219
|
+
* @title Remove Event
|
|
220
|
+
* @since 3.0.0-beta.4
|
|
221
|
+
* @method map.removeEvent(eventId)
|
|
222
|
+
* @param {string} eventId Event Name
|
|
223
|
+
* @returns {boolean}
|
|
224
|
+
* @memberof Map
|
|
225
|
+
*/
|
|
226
|
+
removeEvent(eventId) {
|
|
227
|
+
if (!this.events[eventId])
|
|
228
|
+
return false;
|
|
229
|
+
delete this.events[eventId];
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
137
232
|
createEvent(obj, mode, shape) {
|
|
138
233
|
let event, position;
|
|
139
234
|
// We retrieve the information of the event ([Event] or [{event: Event, x: number, y: number}])
|
|
140
|
-
if (obj
|
|
235
|
+
if (obj.x === undefined) {
|
|
141
236
|
event = obj;
|
|
142
237
|
}
|
|
143
238
|
else {
|
|
144
|
-
event = obj
|
|
145
|
-
position = { x: obj
|
|
239
|
+
event = obj.event;
|
|
240
|
+
position = { x: obj.x, y: obj.y, z: 0 };
|
|
146
241
|
}
|
|
147
242
|
// The event is ignored if the mode is different.
|
|
148
243
|
if (event.mode != mode) {
|
package/lib/Game/Map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Map.js","sourceRoot":"","sources":["../../src/Game/Map.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Map.js","sourceRoot":"","sources":["../../src/Game/Map.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0CAA8D;AAE9D,4CAAmB;AACnB,2CAA4B;AAE5B,oCAA8C;AAC9C,uDAA4C;AAY5C,MAAM,SAAU,SAAQ,gBAAQ;IAI5B,MAAM;QACF,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,UAAU,CAAA;QACtE,IAAI,OAAO,EAAE;YACT,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;SAC3B;QACD,IAAI,SAAS,EAAE;YACX,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAA;SAClC;QACD,IAAI,KAAK,EAAE;YACP,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;SACrB;QACD,IAAI,SAAS,EAAE;YACX,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;SAC7B;QACD,IAAI,IAAI,IAAI,QAAQ,EAAE;YAClB,IAAI,CAAC,iBAAiB,CAAC,CAAE,kBAAI,CAAC,UAAU,EAAE,CAAE,CAAC,CAAA;SAChD;IACL,CAAC;IAEK,QAAQ,CAAC,MAAiB;;YAC5B,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,UAAU,CAAA;YAChC,IAAI,IAAI,EAAE;gBACN,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;oBACxB,QAAQ,EAAE,IAAI;iBACjB,CAAC,CAAA;aACL;QACL,CAAC;KAAA;;AA5BM,gBAAM,GAAQ,EAAE,CAAA;AA+B3B,MAAa,MAAO,SAAQ,qBAAY;IAsBpC,YAA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CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,YAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;gBACzC,IAAI,GAAG;oBAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAA;gBAC3B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;YAC7B,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC;IAED,OAAO,CAAC,MAAW;QACf,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;CACJ;AA9PD,wBA8PC"}
|
|
@@ -20,7 +20,7 @@ export declare class BattleManager {
|
|
|
20
20
|
* @returns {object}
|
|
21
21
|
* @memberof BattleManager
|
|
22
22
|
* */
|
|
23
|
-
applyDamage(otherPlayer: RpgPlayer, skill
|
|
23
|
+
applyDamage(otherPlayer: RpgPlayer, skill?: any): {
|
|
24
24
|
damage: number;
|
|
25
25
|
critical: boolean;
|
|
26
26
|
elementVulnerable: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BattleManager.js","sourceRoot":"","sources":["../../src/Player/BattleManager.ts"],"names":[],"mappings":";;;AAAA,0CAAsC;AACtC,yDAAqD;AAErD,wCAImB;AACnB,8CAAwC;AACxC,qDAAkD;AAClD,mDAAgD;AAEhD,MAAM,EACF,WAAW,EACd,GAAG,cAAK,CAAA;AAET,MAAa,aAAa;IAEtB;;;;;;;;;;;;;;;;SAgBK;IACL,WAAW,CAAC,WAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"BattleManager.js","sourceRoot":"","sources":["../../src/Player/BattleManager.ts"],"names":[],"mappings":";;;AAAA,0CAAsC;AACtC,yDAAqD;AAErD,wCAImB;AACnB,8CAAwC;AACxC,qDAAkD;AAClD,mDAAgD;AAEhD,MAAM,EACF,WAAW,EACd,GAAG,cAAK,CAAA;AAET,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;AAED,WAAW,CAAC,aAAa,EAAE,CAAC,mCAAgB,EAAE,+BAAc,EAAE,6BAAa,CAAC,CAAC,CAAA"}
|
|
@@ -93,7 +93,7 @@ export declare class ElementManager extends ItemFixture {
|
|
|
93
93
|
* @readonly
|
|
94
94
|
* @memberof ElementManager
|
|
95
95
|
* */
|
|
96
|
-
get elements():
|
|
96
|
+
get elements(): any[];
|
|
97
97
|
coefficientElements(otherPlayer: RpgPlayer): number;
|
|
98
98
|
}
|
|
99
99
|
export interface ElementManager {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RpgPlayer } from './Player';
|
|
1
2
|
import { Gui } from '../Gui';
|
|
2
3
|
import { DialogOptions, Choice } from '../Gui/DialogGui';
|
|
3
4
|
export declare class GuiManager {
|
|
@@ -196,4 +197,49 @@ export declare class GuiManager {
|
|
|
196
197
|
* @memberof GuiManager
|
|
197
198
|
*/
|
|
198
199
|
removeGui(guiId: string, data?: any): void;
|
|
200
|
+
private _attachedGui;
|
|
201
|
+
/**
|
|
202
|
+
* Display the GUI attached to the players
|
|
203
|
+
*
|
|
204
|
+
* If you don't specify the players as parameters, it will display the GUI of the instance
|
|
205
|
+
* But you can specify which GUIs to display by specifying the players as the first parameter
|
|
206
|
+
*
|
|
207
|
+
* @method player.showAttachedGui(players?)
|
|
208
|
+
* @param {RpgPlayer[] | RpgPlayer} [players] The GUIs attached to the players to display
|
|
209
|
+
* @since 3.0.0-beta.5
|
|
210
|
+
* @example
|
|
211
|
+
* ```ts
|
|
212
|
+
* player.showAttachedGui()
|
|
213
|
+
* ```
|
|
214
|
+
* ```ts
|
|
215
|
+
* player.showAttachedGui(aPlayer)
|
|
216
|
+
* ```
|
|
217
|
+
* ```ts
|
|
218
|
+
* player.showAttachedGui([player1, player2])
|
|
219
|
+
* ```
|
|
220
|
+
* @memberof GuiManager
|
|
221
|
+
* */
|
|
222
|
+
showAttachedGui(players?: RpgPlayer[] | RpgPlayer): void;
|
|
223
|
+
/**
|
|
224
|
+
* Hide the GUI attached to the players
|
|
225
|
+
*
|
|
226
|
+
* @method player.hideAttachedGui(players?)
|
|
227
|
+
* @param {RpgPlayer[] | RpgPlayer} [players] The GUIs attached to the players to hide
|
|
228
|
+
* @since 3.0.0-beta.5
|
|
229
|
+
* @example
|
|
230
|
+
* ```ts
|
|
231
|
+
* player.hideAttachedGui()
|
|
232
|
+
* ```
|
|
233
|
+
* ```ts
|
|
234
|
+
* player.hideAttachedGui(aPlayer)
|
|
235
|
+
* ```
|
|
236
|
+
* ```ts
|
|
237
|
+
* player.hideAttachedGui([player1, player2])
|
|
238
|
+
* ```
|
|
239
|
+
* @memberof GuiManager
|
|
240
|
+
* */
|
|
241
|
+
hideAttachedGui(players?: RpgPlayer[] | RpgPlayer): void;
|
|
242
|
+
}
|
|
243
|
+
export interface GuiManager {
|
|
244
|
+
emit: any;
|
|
199
245
|
}
|
package/lib/Player/GuiManager.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GuiManager = void 0;
|
|
4
|
+
const common_1 = require("@rpgjs/common");
|
|
4
5
|
const Gui_1 = require("../Gui");
|
|
5
6
|
class GuiManager {
|
|
6
7
|
/**
|
|
@@ -225,6 +226,62 @@ class GuiManager {
|
|
|
225
226
|
delete this._gui[guiId];
|
|
226
227
|
}
|
|
227
228
|
}
|
|
229
|
+
_attachedGui(players, display) {
|
|
230
|
+
if (!common_1.Utils.isArray(players)) {
|
|
231
|
+
players = [players];
|
|
232
|
+
}
|
|
233
|
+
this.emit('gui.tooltip', {
|
|
234
|
+
players: players.map(player => player.id),
|
|
235
|
+
display
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Display the GUI attached to the players
|
|
240
|
+
*
|
|
241
|
+
* If you don't specify the players as parameters, it will display the GUI of the instance
|
|
242
|
+
* But you can specify which GUIs to display by specifying the players as the first parameter
|
|
243
|
+
*
|
|
244
|
+
* @method player.showAttachedGui(players?)
|
|
245
|
+
* @param {RpgPlayer[] | RpgPlayer} [players] The GUIs attached to the players to display
|
|
246
|
+
* @since 3.0.0-beta.5
|
|
247
|
+
* @example
|
|
248
|
+
* ```ts
|
|
249
|
+
* player.showAttachedGui()
|
|
250
|
+
* ```
|
|
251
|
+
* ```ts
|
|
252
|
+
* player.showAttachedGui(aPlayer)
|
|
253
|
+
* ```
|
|
254
|
+
* ```ts
|
|
255
|
+
* player.showAttachedGui([player1, player2])
|
|
256
|
+
* ```
|
|
257
|
+
* @memberof GuiManager
|
|
258
|
+
* */
|
|
259
|
+
showAttachedGui(players) {
|
|
260
|
+
const _players = players || this;
|
|
261
|
+
this._attachedGui(_players, true);
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Hide the GUI attached to the players
|
|
265
|
+
*
|
|
266
|
+
* @method player.hideAttachedGui(players?)
|
|
267
|
+
* @param {RpgPlayer[] | RpgPlayer} [players] The GUIs attached to the players to hide
|
|
268
|
+
* @since 3.0.0-beta.5
|
|
269
|
+
* @example
|
|
270
|
+
* ```ts
|
|
271
|
+
* player.hideAttachedGui()
|
|
272
|
+
* ```
|
|
273
|
+
* ```ts
|
|
274
|
+
* player.hideAttachedGui(aPlayer)
|
|
275
|
+
* ```
|
|
276
|
+
* ```ts
|
|
277
|
+
* player.hideAttachedGui([player1, player2])
|
|
278
|
+
* ```
|
|
279
|
+
* @memberof GuiManager
|
|
280
|
+
* */
|
|
281
|
+
hideAttachedGui(players) {
|
|
282
|
+
const _players = players || this;
|
|
283
|
+
this._attachedGui(_players, false);
|
|
284
|
+
}
|
|
228
285
|
}
|
|
229
286
|
exports.GuiManager = GuiManager;
|
|
230
287
|
//# sourceMappingURL=GuiManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuiManager.js","sourceRoot":"","sources":["../../src/Player/GuiManager.ts"],"names":[],"mappings":";;;AAAA,gCAA0E;AAG1E,MAA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
10
|
High = 100,
|
|
11
|
-
|
|
11
|
+
Higher = 50,
|
|
12
12
|
Highest = 25,
|
|
13
13
|
None = 0
|
|
14
14
|
}
|
|
@@ -62,8 +62,8 @@ export declare const Move: {
|
|
|
62
62
|
tileUp(repeat?: number): CallbackTileMove;
|
|
63
63
|
tileDown(repeat?: number): CallbackTileMove;
|
|
64
64
|
tileRandom(repeat?: number): CallbackTileMove;
|
|
65
|
-
_awayFromPlayerDirection(player: RpgPlayer, otherPlayer: RpgPlayer):
|
|
66
|
-
_towardPlayerDirection(player: RpgPlayer, otherPlayer: RpgPlayer):
|
|
65
|
+
_awayFromPlayerDirection(player: RpgPlayer, otherPlayer: RpgPlayer): number;
|
|
66
|
+
_towardPlayerDirection(player: RpgPlayer, otherPlayer: RpgPlayer): number;
|
|
67
67
|
_awayFromPlayer({ isTile, typeMov }: {
|
|
68
68
|
isTile: boolean;
|
|
69
69
|
typeMov: string;
|
|
@@ -175,7 +175,7 @@ export declare class MoveManager {
|
|
|
175
175
|
* Frequency.Lower | 400
|
|
176
176
|
* Frequency.Low | 200
|
|
177
177
|
* Frequency.High | 100
|
|
178
|
-
* Frequency.
|
|
178
|
+
* Frequency.Higher | 50
|
|
179
179
|
* Frequency.Highest | 25
|
|
180
180
|
* Frequency.None | 0
|
|
181
181
|
* @default 0
|
|
@@ -290,7 +290,7 @@ export declare class MoveManager {
|
|
|
290
290
|
replayRoutes(): void;
|
|
291
291
|
}
|
|
292
292
|
export interface MoveManager {
|
|
293
|
-
moveByDirection: (direction: Direction) => boolean;
|
|
293
|
+
moveByDirection: (direction: Direction, deltaTimeInt: number) => boolean;
|
|
294
294
|
changeDirection: (direction: Direction) => boolean;
|
|
295
295
|
getCurrentMap: any;
|
|
296
296
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MoveManager = exports.Move = exports.Speed = exports.Frequency = void 0;
|
|
4
4
|
const common_1 = require("@rpgjs/common");
|
|
5
5
|
const common_2 = require("@rpgjs/common");
|
|
6
|
-
const { arrayFlat, random, isFunction, capitalize
|
|
6
|
+
const { arrayFlat, random, isFunction, capitalize } = common_2.Utils;
|
|
7
7
|
function wait(sec) {
|
|
8
8
|
return new Promise((resolve) => {
|
|
9
9
|
setTimeout(resolve, sec * 1000);
|
|
@@ -15,7 +15,7 @@ var Frequency;
|
|
|
15
15
|
Frequency[Frequency["Lower"] = 400] = "Lower";
|
|
16
16
|
Frequency[Frequency["Low"] = 200] = "Low";
|
|
17
17
|
Frequency[Frequency["High"] = 100] = "High";
|
|
18
|
-
Frequency[Frequency["
|
|
18
|
+
Frequency[Frequency["Higher"] = 50] = "Higher";
|
|
19
19
|
Frequency[Frequency["Highest"] = 25] = "Highest";
|
|
20
20
|
Frequency[Frequency["None"] = 0] = "None";
|
|
21
21
|
})(Frequency = exports.Frequency || (exports.Frequency = {}));
|
|
@@ -121,7 +121,7 @@ exports.Move = new class {
|
|
|
121
121
|
}
|
|
122
122
|
_awayFromPlayerDirection(player, otherPlayer) {
|
|
123
123
|
const directionOtherPlayer = otherPlayer.getDirection();
|
|
124
|
-
let newDirection =
|
|
124
|
+
let newDirection = 0;
|
|
125
125
|
switch (directionOtherPlayer) {
|
|
126
126
|
case common_1.Direction.Left:
|
|
127
127
|
case common_1.Direction.Right:
|
|
@@ -146,7 +146,7 @@ exports.Move = new class {
|
|
|
146
146
|
}
|
|
147
147
|
_towardPlayerDirection(player, otherPlayer) {
|
|
148
148
|
const directionOtherPlayer = otherPlayer.getDirection();
|
|
149
|
-
let newDirection =
|
|
149
|
+
let newDirection = 0;
|
|
150
150
|
switch (directionOtherPlayer) {
|
|
151
151
|
case common_1.Direction.Left:
|
|
152
152
|
case common_1.Direction.Right:
|
|
@@ -172,7 +172,7 @@ exports.Move = new class {
|
|
|
172
172
|
_awayFromPlayer({ isTile, typeMov }, otherPlayer, repeat = 1) {
|
|
173
173
|
const method = dir => this[isTile ? 'tile' + capitalize(dir) : dir](repeat);
|
|
174
174
|
return (player, map) => {
|
|
175
|
-
let newDirection =
|
|
175
|
+
let newDirection = 0;
|
|
176
176
|
switch (typeMov) {
|
|
177
177
|
case 'away':
|
|
178
178
|
newDirection = this._awayFromPlayerDirection(player, otherPlayer);
|
|
@@ -314,7 +314,7 @@ class MoveManager {
|
|
|
314
314
|
case common_1.Direction.Down:
|
|
315
315
|
case common_1.Direction.Right:
|
|
316
316
|
case common_1.Direction.Up:
|
|
317
|
-
this.moveByDirection(route);
|
|
317
|
+
this.moveByDirection(route, 1);
|
|
318
318
|
break;
|
|
319
319
|
case 'turn-left':
|
|
320
320
|
this.changeDirection(common_1.Direction.Left);
|
|
@@ -330,12 +330,6 @@ class MoveManager {
|
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
routes.shift();
|
|
333
|
-
/*
|
|
334
|
-
if (this.constructor['mode'] == EventMode.Scenario) {
|
|
335
|
-
const room = World.getRoom(this['map'])
|
|
336
|
-
if (room.$detectChanges) room.$detectChanges()
|
|
337
|
-
}
|
|
338
|
-
*/
|
|
339
333
|
};
|
|
340
334
|
move();
|
|
341
335
|
this.movingInterval = setInterval(move, 16);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoveManager.js","sourceRoot":"","sources":["../../src/Player/MoveManager.ts"],"names":[],"mappings":";;;AAAA,0CAAyC;AACzC,0CAAqC;
|
|
1
|
+
{"version":3,"file":"MoveManager.js","sourceRoot":"","sources":["../../src/Player/MoveManager.ts"],"names":[],"mappings":";;;AAAA,0CAAyC;AACzC,0CAAqC;AAGrC,MAAM,EACF,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACb,GAAG,cAAK,CAAA;AAET,SAAS,IAAI,CAAC,GAAW;IACrB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,UAAU,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;AACN,CAAC;AAMD,IAA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