@rpgjs/server 4.3.0 → 5.0.0-alpha.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.
- package/{lib → dist}/Gui/DialogGui.d.ts +1 -2
- package/{lib → dist}/Gui/Gui.d.ts +1 -2
- package/dist/Player/BattleManager.d.ts +22 -0
- package/dist/Player/ClassManager.d.ts +18 -0
- package/dist/Player/Event.d.ts +0 -0
- package/dist/Player/ItemManager.d.ts +17 -0
- package/dist/Player/MoveManager.d.ts +177 -0
- package/dist/Player/ParameterManager.d.ts +42 -0
- package/dist/Player/Player.d.ts +73 -0
- package/dist/Player/SkillManager.d.ts +23 -0
- package/dist/Player/StateManager.d.ts +39 -0
- package/{lib → dist}/RpgServer.d.ts +32 -15
- package/dist/RpgServerEngine.d.ts +5 -0
- package/dist/core/context.d.ts +2 -0
- package/dist/core/inject.d.ts +5 -0
- package/dist/core/setup.d.ts +6 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +29673 -0
- package/dist/index.js.map +1 -0
- package/dist/module.d.ts +2 -0
- package/dist/rooms/lobby.d.ts +6 -0
- package/dist/rooms/map.d.ts +110 -0
- package/package.json +15 -37
- package/src/Gui/DialogGui.ts +3 -4
- package/src/Gui/Gui.ts +4 -6
- package/src/Player/BattleManager.ts +108 -99
- package/src/Player/ClassManager.ts +47 -46
- package/src/Player/ComponentManager.ts +26 -535
- package/src/Player/EffectManager.ts +44 -59
- package/src/Player/ElementManager.ts +70 -72
- package/src/Player/Event.ts +0 -0
- package/src/Player/GoldManager.ts +24 -6
- package/src/Player/GuiManager.ts +106 -97
- package/src/Player/ItemFixture.ts +22 -17
- package/src/Player/ItemManager.ts +234 -225
- package/src/Player/MoveManager.ts +1047 -457
- package/src/Player/ParameterManager.ts +59 -37
- package/src/Player/Player.ts +272 -1058
- package/src/Player/SkillManager.ts +146 -137
- package/src/Player/StateManager.ts +124 -98
- package/src/Player/VariableManager.ts +23 -3
- package/src/RpgServer.ts +36 -12
- package/src/RpgServerEngine.ts +7 -0
- package/src/core/context.ts +3 -0
- package/src/core/inject.ts +17 -0
- package/src/core/setup.ts +20 -0
- package/src/index.ts +9 -31
- package/src/module.ts +32 -0
- package/src/presets/index.ts +1 -3
- package/src/rooms/lobby.ts +24 -0
- package/src/rooms/map.ts +311 -0
- package/tsconfig.json +26 -23
- package/vite.config.ts +21 -0
- package/CHANGELOG.md +0 -174
- package/LICENSE +0 -19
- package/browser/manifest.json +0 -7
- package/browser/rpg.server.js +0 -22379
- package/browser/rpg.server.umd.cjs +0 -22410
- package/lib/Game/EventManager.d.ts +0 -54
- package/lib/Game/EventManager.js +0 -107
- package/lib/Game/EventManager.js.map +0 -1
- package/lib/Game/Map.d.ts +0 -191
- package/lib/Game/Map.js +0 -419
- package/lib/Game/Map.js.map +0 -1
- package/lib/Game/WorldMaps.d.ts +0 -17
- package/lib/Game/WorldMaps.js +0 -28
- package/lib/Game/WorldMaps.js.map +0 -1
- package/lib/Gui/DialogGui.js +0 -57
- package/lib/Gui/DialogGui.js.map +0 -1
- package/lib/Gui/Gui.js +0 -37
- package/lib/Gui/Gui.js.map +0 -1
- package/lib/Gui/MenuGui.js +0 -23
- package/lib/Gui/MenuGui.js.map +0 -1
- package/lib/Gui/NotificationGui.js +0 -8
- package/lib/Gui/NotificationGui.js.map +0 -1
- package/lib/Gui/ShopGui.js +0 -40
- package/lib/Gui/ShopGui.js.map +0 -1
- package/lib/Gui/index.js +0 -7
- package/lib/Gui/index.js.map +0 -1
- package/lib/Interfaces/Gui.d.ts +0 -4
- package/lib/Interfaces/Gui.js +0 -2
- package/lib/Interfaces/Gui.js.map +0 -1
- package/lib/Interfaces/StateStore.d.ts +0 -5
- package/lib/Interfaces/StateStore.js +0 -2
- package/lib/Interfaces/StateStore.js.map +0 -1
- package/lib/MatchMaker.d.ts +0 -24
- package/lib/MatchMaker.js +0 -42
- package/lib/MatchMaker.js.map +0 -1
- package/lib/Monitor/index.d.ts +0 -17
- package/lib/Monitor/index.js +0 -72
- package/lib/Monitor/index.js.map +0 -1
- package/lib/Player/BattleManager.d.ts +0 -36
- package/lib/Player/BattleManager.js +0 -101
- package/lib/Player/BattleManager.js.map +0 -1
- package/lib/Player/ClassManager.d.ts +0 -47
- package/lib/Player/ClassManager.js +0 -65
- package/lib/Player/ClassManager.js.map +0 -1
- package/lib/Player/ComponentManager.d.ts +0 -397
- package/lib/Player/ComponentManager.js +0 -505
- package/lib/Player/ComponentManager.js.map +0 -1
- package/lib/Player/EffectManager.d.ts +0 -46
- package/lib/Player/EffectManager.js +0 -75
- package/lib/Player/EffectManager.js.map +0 -1
- package/lib/Player/ElementManager.d.ts +0 -108
- package/lib/Player/ElementManager.js +0 -120
- package/lib/Player/ElementManager.js.map +0 -1
- package/lib/Player/GoldManager.d.ts +0 -17
- package/lib/Player/GoldManager.js +0 -27
- package/lib/Player/GoldManager.js.map +0 -1
- package/lib/Player/GuiManager.d.ts +0 -247
- package/lib/Player/GuiManager.js +0 -291
- package/lib/Player/GuiManager.js.map +0 -1
- package/lib/Player/ItemFixture.d.ts +0 -7
- package/lib/Player/ItemFixture.js +0 -19
- package/lib/Player/ItemFixture.js.map +0 -1
- package/lib/Player/ItemManager.d.ts +0 -331
- package/lib/Player/ItemManager.js +0 -475
- package/lib/Player/ItemManager.js.map +0 -1
- package/lib/Player/MoveManager.d.ts +0 -333
- package/lib/Player/MoveManager.js +0 -450
- package/lib/Player/MoveManager.js.map +0 -1
- package/lib/Player/ParameterManager.d.ts +0 -316
- package/lib/Player/ParameterManager.js +0 -408
- package/lib/Player/ParameterManager.js.map +0 -1
- package/lib/Player/Player.d.ts +0 -828
- package/lib/Player/Player.js +0 -927
- package/lib/Player/Player.js.map +0 -1
- package/lib/Player/SkillManager.d.ts +0 -163
- package/lib/Player/SkillManager.js +0 -223
- package/lib/Player/SkillManager.js.map +0 -1
- package/lib/Player/StateManager.d.ts +0 -185
- package/lib/Player/StateManager.js +0 -228
- package/lib/Player/StateManager.js.map +0 -1
- package/lib/Player/VariableManager.d.ts +0 -46
- package/lib/Player/VariableManager.js +0 -52
- package/lib/Player/VariableManager.js.map +0 -1
- package/lib/Query.d.ts +0 -127
- package/lib/Query.js +0 -159
- package/lib/Query.js.map +0 -1
- package/lib/RpgServer.js +0 -2
- package/lib/RpgServer.js.map +0 -1
- package/lib/Scenes/Map.d.ts +0 -136
- package/lib/Scenes/Map.js +0 -273
- package/lib/Scenes/Map.js.map +0 -1
- package/lib/decorators/event.d.ts +0 -43
- package/lib/decorators/event.js +0 -13
- package/lib/decorators/event.js.map +0 -1
- package/lib/decorators/map.d.ts +0 -178
- package/lib/decorators/map.js +0 -43
- package/lib/decorators/map.js.map +0 -1
- package/lib/entry-point.d.ts +0 -34
- package/lib/entry-point.js +0 -70
- package/lib/entry-point.js.map +0 -1
- package/lib/express/api.d.ts +0 -3
- package/lib/express/api.js +0 -105
- package/lib/express/api.js.map +0 -1
- package/lib/express/errors/NotAuthorized.d.ts +0 -4
- package/lib/express/errors/NotAuthorized.js +0 -7
- package/lib/express/errors/NotAuthorized.js.map +0 -1
- package/lib/express/errors/NotFound.d.ts +0 -4
- package/lib/express/errors/NotFound.js +0 -7
- package/lib/express/errors/NotFound.js.map +0 -1
- package/lib/express/server.d.ts +0 -18
- package/lib/express/server.js +0 -70
- package/lib/express/server.js.map +0 -1
- package/lib/index.d.ts +0 -20
- package/lib/index.js +0 -19
- package/lib/index.js.map +0 -1
- package/lib/inject.d.ts +0 -22
- package/lib/inject.js +0 -29
- package/lib/inject.js.map +0 -1
- package/lib/logs/index.js +0 -6
- package/lib/logs/index.js.map +0 -1
- package/lib/logs/item.js +0 -34
- package/lib/logs/item.js.map +0 -1
- package/lib/logs/log.js +0 -7
- package/lib/logs/log.js.map +0 -1
- package/lib/logs/skill.js +0 -19
- package/lib/logs/skill.js.map +0 -1
- package/lib/logs/state.js +0 -13
- package/lib/logs/state.js.map +0 -1
- package/lib/models/Item.d.ts +0 -10
- package/lib/models/Item.js +0 -2
- package/lib/models/Item.js.map +0 -1
- package/lib/presets/index.js +0 -65
- package/lib/presets/index.js.map +0 -1
- package/lib/server.d.ts +0 -137
- package/lib/server.js +0 -443
- package/lib/server.js.map +0 -1
- package/rpg.toml +0 -14
- package/src/Game/EventManager.ts +0 -125
- package/src/Game/Map.ts +0 -500
- package/src/Game/WorldMaps.ts +0 -45
- package/src/Interfaces/Gui.ts +0 -4
- package/src/Interfaces/StateStore.ts +0 -5
- package/src/MatchMaker.ts +0 -65
- package/src/Monitor/index.ts +0 -78
- package/src/Query.ts +0 -172
- package/src/Scenes/Map.ts +0 -310
- package/src/decorators/event.ts +0 -58
- package/src/decorators/map.ts +0 -226
- package/src/entry-point.ts +0 -111
- package/src/express/api.ts +0 -118
- package/src/express/errors/NotAuthorized.ts +0 -6
- package/src/express/errors/NotFound.ts +0 -6
- package/src/express/server.ts +0 -94
- package/src/inject.ts +0 -33
- package/src/models/Item.ts +0 -11
- package/src/server.ts +0 -459
- /package/{lib → dist}/Gui/MenuGui.d.ts +0 -0
- /package/{lib → dist}/Gui/NotificationGui.d.ts +0 -0
- /package/{lib → dist}/Gui/ShopGui.d.ts +0 -0
- /package/{lib → dist}/Gui/index.d.ts +0 -0
- /package/{lib → dist}/logs/index.d.ts +0 -0
- /package/{lib → dist}/logs/item.d.ts +0 -0
- /package/{lib → dist}/logs/log.d.ts +0 -0
- /package/{lib → dist}/logs/skill.d.ts +0 -0
- /package/{lib → dist}/logs/state.d.ts +0 -0
- /package/{lib → dist}/presets/index.d.ts +0 -0
package/lib/Player/Player.d.ts
DELETED
|
@@ -1,828 +0,0 @@
|
|
|
1
|
-
import { RpgCommonPlayer, RpgCommonGame } from '@rpgjs/common';
|
|
2
|
-
import { WorldClass } from 'simple-room';
|
|
3
|
-
import { RpgMap, EventPosOption } from '../Game/Map';
|
|
4
|
-
import { ItemManager } from './ItemManager';
|
|
5
|
-
import { GoldManager } from './GoldManager';
|
|
6
|
-
import { StateManager } from './StateManager';
|
|
7
|
-
import { SkillManager } from './SkillManager';
|
|
8
|
-
import { ParameterManager } from './ParameterManager';
|
|
9
|
-
import { EffectManager } from './EffectManager';
|
|
10
|
-
import { ClassManager } from './ClassManager';
|
|
11
|
-
import { ElementManager } from './ElementManager';
|
|
12
|
-
import { GuiManager } from './GuiManager';
|
|
13
|
-
import { VariableManager } from './VariableManager';
|
|
14
|
-
import { MoveManager } from './MoveManager';
|
|
15
|
-
import { BattleManager } from './BattleManager';
|
|
16
|
-
import { RpgServerEngine } from '../server';
|
|
17
|
-
import { CameraOptions, PositionXY_OptionalZ, LayoutObject } from '@rpgjs/types';
|
|
18
|
-
import { ComponentManager } from './ComponentManager';
|
|
19
|
-
import { EventManager, EventMode } from '../Game/EventManager';
|
|
20
|
-
export interface Position {
|
|
21
|
-
x: number;
|
|
22
|
-
y: number;
|
|
23
|
-
z: number;
|
|
24
|
-
}
|
|
25
|
-
export declare const componentSchema: {
|
|
26
|
-
id: StringConstructor;
|
|
27
|
-
value: StringConstructor;
|
|
28
|
-
};
|
|
29
|
-
export declare const layoutSchema: {
|
|
30
|
-
width: NumberConstructor;
|
|
31
|
-
height: NumberConstructor;
|
|
32
|
-
marginBottom: NumberConstructor;
|
|
33
|
-
marginTop: NumberConstructor;
|
|
34
|
-
marginLeft: NumberConstructor;
|
|
35
|
-
marginRight: NumberConstructor;
|
|
36
|
-
lines: {
|
|
37
|
-
col: {
|
|
38
|
-
id: StringConstructor;
|
|
39
|
-
value: StringConstructor;
|
|
40
|
-
}[];
|
|
41
|
-
}[];
|
|
42
|
-
};
|
|
43
|
-
export declare class RpgPlayer extends RpgCommonPlayer {
|
|
44
|
-
playerId: string;
|
|
45
|
-
readonly type: string;
|
|
46
|
-
static schemas: {
|
|
47
|
-
events: {
|
|
48
|
-
position: {
|
|
49
|
-
x: NumberConstructor;
|
|
50
|
-
y: NumberConstructor;
|
|
51
|
-
z: NumberConstructor;
|
|
52
|
-
};
|
|
53
|
-
direction: NumberConstructor;
|
|
54
|
-
teleported: {
|
|
55
|
-
$permanent: boolean;
|
|
56
|
-
};
|
|
57
|
-
deleted: {
|
|
58
|
-
$permanent: boolean;
|
|
59
|
-
};
|
|
60
|
-
moving: {
|
|
61
|
-
$permanent: boolean;
|
|
62
|
-
};
|
|
63
|
-
param: ObjectConstructor;
|
|
64
|
-
hp: NumberConstructor;
|
|
65
|
-
sp: NumberConstructor;
|
|
66
|
-
gold: NumberConstructor;
|
|
67
|
-
level: {
|
|
68
|
-
$effects: string[];
|
|
69
|
-
};
|
|
70
|
-
expForNextlevel: {
|
|
71
|
-
$permanent: boolean;
|
|
72
|
-
};
|
|
73
|
-
exp: NumberConstructor;
|
|
74
|
-
name: StringConstructor;
|
|
75
|
-
items: {
|
|
76
|
-
nb: NumberConstructor;
|
|
77
|
-
item: {
|
|
78
|
-
name: {
|
|
79
|
-
$permanent: boolean;
|
|
80
|
-
};
|
|
81
|
-
description: {
|
|
82
|
-
$permanent: boolean;
|
|
83
|
-
};
|
|
84
|
-
id: StringConstructor;
|
|
85
|
-
price: {
|
|
86
|
-
$permanent: boolean;
|
|
87
|
-
};
|
|
88
|
-
consumable: {
|
|
89
|
-
$permanent: boolean;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
}[];
|
|
93
|
-
_class: {
|
|
94
|
-
name: {
|
|
95
|
-
$permanent: boolean;
|
|
96
|
-
};
|
|
97
|
-
description: {
|
|
98
|
-
$permanent: boolean;
|
|
99
|
-
};
|
|
100
|
-
id: StringConstructor;
|
|
101
|
-
};
|
|
102
|
-
equipments: {
|
|
103
|
-
name: {
|
|
104
|
-
$permanent: boolean;
|
|
105
|
-
};
|
|
106
|
-
description: {
|
|
107
|
-
$permanent: boolean;
|
|
108
|
-
};
|
|
109
|
-
id: StringConstructor;
|
|
110
|
-
price: {
|
|
111
|
-
$permanent: boolean;
|
|
112
|
-
};
|
|
113
|
-
consumable: {
|
|
114
|
-
$permanent: boolean;
|
|
115
|
-
};
|
|
116
|
-
}[];
|
|
117
|
-
skills: {
|
|
118
|
-
name: {
|
|
119
|
-
$permanent: boolean;
|
|
120
|
-
};
|
|
121
|
-
description: {
|
|
122
|
-
$permanent: boolean;
|
|
123
|
-
};
|
|
124
|
-
id: StringConstructor;
|
|
125
|
-
spCost: {
|
|
126
|
-
$permanent: boolean;
|
|
127
|
-
};
|
|
128
|
-
}[];
|
|
129
|
-
states: {
|
|
130
|
-
name: {
|
|
131
|
-
$permanent: boolean;
|
|
132
|
-
};
|
|
133
|
-
description: {
|
|
134
|
-
$permanent: boolean;
|
|
135
|
-
};
|
|
136
|
-
id: StringConstructor;
|
|
137
|
-
}[];
|
|
138
|
-
effects: StringConstructor[];
|
|
139
|
-
layout: {
|
|
140
|
-
top: {
|
|
141
|
-
width: NumberConstructor;
|
|
142
|
-
height: NumberConstructor;
|
|
143
|
-
marginBottom: NumberConstructor;
|
|
144
|
-
marginTop: NumberConstructor;
|
|
145
|
-
marginLeft: NumberConstructor;
|
|
146
|
-
marginRight: NumberConstructor;
|
|
147
|
-
lines: {
|
|
148
|
-
col: {
|
|
149
|
-
id: StringConstructor;
|
|
150
|
-
value: StringConstructor;
|
|
151
|
-
}[];
|
|
152
|
-
}[];
|
|
153
|
-
};
|
|
154
|
-
bottom: {
|
|
155
|
-
width: NumberConstructor;
|
|
156
|
-
height: NumberConstructor;
|
|
157
|
-
marginBottom: NumberConstructor;
|
|
158
|
-
marginTop: NumberConstructor;
|
|
159
|
-
marginLeft: NumberConstructor;
|
|
160
|
-
marginRight: NumberConstructor;
|
|
161
|
-
lines: {
|
|
162
|
-
col: {
|
|
163
|
-
id: StringConstructor;
|
|
164
|
-
value: StringConstructor;
|
|
165
|
-
}[];
|
|
166
|
-
}[];
|
|
167
|
-
};
|
|
168
|
-
left: {
|
|
169
|
-
width: NumberConstructor;
|
|
170
|
-
height: NumberConstructor;
|
|
171
|
-
marginBottom: NumberConstructor;
|
|
172
|
-
marginTop: NumberConstructor;
|
|
173
|
-
marginLeft: NumberConstructor;
|
|
174
|
-
marginRight: NumberConstructor;
|
|
175
|
-
lines: {
|
|
176
|
-
col: {
|
|
177
|
-
id: StringConstructor;
|
|
178
|
-
value: StringConstructor;
|
|
179
|
-
}[];
|
|
180
|
-
}[];
|
|
181
|
-
};
|
|
182
|
-
right: {
|
|
183
|
-
width: NumberConstructor;
|
|
184
|
-
height: NumberConstructor;
|
|
185
|
-
marginBottom: NumberConstructor;
|
|
186
|
-
marginTop: NumberConstructor;
|
|
187
|
-
marginLeft: NumberConstructor;
|
|
188
|
-
marginRight: NumberConstructor;
|
|
189
|
-
lines: {
|
|
190
|
-
col: {
|
|
191
|
-
id: StringConstructor;
|
|
192
|
-
value: StringConstructor;
|
|
193
|
-
}[];
|
|
194
|
-
}[];
|
|
195
|
-
};
|
|
196
|
-
center: {
|
|
197
|
-
width: NumberConstructor;
|
|
198
|
-
height: NumberConstructor;
|
|
199
|
-
marginBottom: NumberConstructor;
|
|
200
|
-
marginTop: NumberConstructor;
|
|
201
|
-
marginLeft: NumberConstructor;
|
|
202
|
-
marginRight: NumberConstructor;
|
|
203
|
-
lines: {
|
|
204
|
-
col: {
|
|
205
|
-
id: StringConstructor;
|
|
206
|
-
value: StringConstructor;
|
|
207
|
-
}[];
|
|
208
|
-
}[];
|
|
209
|
-
};
|
|
210
|
-
};
|
|
211
|
-
action: NumberConstructor;
|
|
212
|
-
map: StringConstructor;
|
|
213
|
-
speed: NumberConstructor;
|
|
214
|
-
frequency: NumberConstructor;
|
|
215
|
-
canMove: BooleanConstructor;
|
|
216
|
-
through: BooleanConstructor;
|
|
217
|
-
throughOtherPlayer: BooleanConstructor;
|
|
218
|
-
width: NumberConstructor;
|
|
219
|
-
height: NumberConstructor;
|
|
220
|
-
wHitbox: NumberConstructor;
|
|
221
|
-
hHitbox: NumberConstructor;
|
|
222
|
-
_statesEfficiency: {
|
|
223
|
-
rate: {
|
|
224
|
-
$syncWithClient: boolean;
|
|
225
|
-
};
|
|
226
|
-
state: {
|
|
227
|
-
$syncWithClient: boolean;
|
|
228
|
-
};
|
|
229
|
-
}[];
|
|
230
|
-
tmpPositions: {
|
|
231
|
-
$syncWithClient: boolean;
|
|
232
|
-
};
|
|
233
|
-
initialLevel: {
|
|
234
|
-
$syncWithClient: boolean;
|
|
235
|
-
};
|
|
236
|
-
finalLevel: {
|
|
237
|
-
$syncWithClient: boolean;
|
|
238
|
-
};
|
|
239
|
-
}[];
|
|
240
|
-
position: {
|
|
241
|
-
x: NumberConstructor;
|
|
242
|
-
y: NumberConstructor;
|
|
243
|
-
z: NumberConstructor;
|
|
244
|
-
};
|
|
245
|
-
direction: NumberConstructor;
|
|
246
|
-
teleported: {
|
|
247
|
-
$permanent: boolean;
|
|
248
|
-
};
|
|
249
|
-
deleted: {
|
|
250
|
-
$permanent: boolean;
|
|
251
|
-
};
|
|
252
|
-
moving: {
|
|
253
|
-
$permanent: boolean;
|
|
254
|
-
};
|
|
255
|
-
param: ObjectConstructor;
|
|
256
|
-
hp: NumberConstructor;
|
|
257
|
-
sp: NumberConstructor;
|
|
258
|
-
gold: NumberConstructor;
|
|
259
|
-
level: {
|
|
260
|
-
$effects: string[];
|
|
261
|
-
};
|
|
262
|
-
expForNextlevel: {
|
|
263
|
-
$permanent: boolean;
|
|
264
|
-
};
|
|
265
|
-
exp: NumberConstructor;
|
|
266
|
-
name: StringConstructor;
|
|
267
|
-
items: {
|
|
268
|
-
nb: NumberConstructor;
|
|
269
|
-
item: {
|
|
270
|
-
name: {
|
|
271
|
-
$permanent: boolean;
|
|
272
|
-
};
|
|
273
|
-
description: {
|
|
274
|
-
$permanent: boolean;
|
|
275
|
-
};
|
|
276
|
-
id: StringConstructor;
|
|
277
|
-
price: {
|
|
278
|
-
$permanent: boolean;
|
|
279
|
-
};
|
|
280
|
-
consumable: {
|
|
281
|
-
$permanent: boolean;
|
|
282
|
-
};
|
|
283
|
-
};
|
|
284
|
-
}[];
|
|
285
|
-
_class: {
|
|
286
|
-
name: {
|
|
287
|
-
$permanent: boolean;
|
|
288
|
-
};
|
|
289
|
-
description: {
|
|
290
|
-
$permanent: boolean;
|
|
291
|
-
};
|
|
292
|
-
id: StringConstructor;
|
|
293
|
-
};
|
|
294
|
-
equipments: {
|
|
295
|
-
name: {
|
|
296
|
-
$permanent: boolean;
|
|
297
|
-
};
|
|
298
|
-
description: {
|
|
299
|
-
$permanent: boolean;
|
|
300
|
-
};
|
|
301
|
-
id: StringConstructor;
|
|
302
|
-
price: {
|
|
303
|
-
$permanent: boolean;
|
|
304
|
-
};
|
|
305
|
-
consumable: {
|
|
306
|
-
$permanent: boolean;
|
|
307
|
-
};
|
|
308
|
-
}[];
|
|
309
|
-
skills: {
|
|
310
|
-
name: {
|
|
311
|
-
$permanent: boolean;
|
|
312
|
-
};
|
|
313
|
-
description: {
|
|
314
|
-
$permanent: boolean;
|
|
315
|
-
};
|
|
316
|
-
id: StringConstructor;
|
|
317
|
-
spCost: {
|
|
318
|
-
$permanent: boolean;
|
|
319
|
-
};
|
|
320
|
-
}[];
|
|
321
|
-
states: {
|
|
322
|
-
name: {
|
|
323
|
-
$permanent: boolean;
|
|
324
|
-
};
|
|
325
|
-
description: {
|
|
326
|
-
$permanent: boolean;
|
|
327
|
-
};
|
|
328
|
-
id: StringConstructor;
|
|
329
|
-
}[];
|
|
330
|
-
effects: StringConstructor[];
|
|
331
|
-
layout: {
|
|
332
|
-
top: {
|
|
333
|
-
width: NumberConstructor;
|
|
334
|
-
height: NumberConstructor;
|
|
335
|
-
marginBottom: NumberConstructor;
|
|
336
|
-
marginTop: NumberConstructor;
|
|
337
|
-
marginLeft: NumberConstructor;
|
|
338
|
-
marginRight: NumberConstructor;
|
|
339
|
-
lines: {
|
|
340
|
-
col: {
|
|
341
|
-
id: StringConstructor;
|
|
342
|
-
value: StringConstructor;
|
|
343
|
-
}[];
|
|
344
|
-
}[];
|
|
345
|
-
};
|
|
346
|
-
bottom: {
|
|
347
|
-
width: NumberConstructor;
|
|
348
|
-
height: NumberConstructor;
|
|
349
|
-
marginBottom: NumberConstructor;
|
|
350
|
-
marginTop: NumberConstructor;
|
|
351
|
-
marginLeft: NumberConstructor;
|
|
352
|
-
marginRight: NumberConstructor;
|
|
353
|
-
lines: {
|
|
354
|
-
col: {
|
|
355
|
-
id: StringConstructor;
|
|
356
|
-
value: StringConstructor;
|
|
357
|
-
}[];
|
|
358
|
-
}[];
|
|
359
|
-
};
|
|
360
|
-
left: {
|
|
361
|
-
width: NumberConstructor;
|
|
362
|
-
height: NumberConstructor;
|
|
363
|
-
marginBottom: NumberConstructor;
|
|
364
|
-
marginTop: NumberConstructor;
|
|
365
|
-
marginLeft: NumberConstructor;
|
|
366
|
-
marginRight: NumberConstructor;
|
|
367
|
-
lines: {
|
|
368
|
-
col: {
|
|
369
|
-
id: StringConstructor;
|
|
370
|
-
value: StringConstructor;
|
|
371
|
-
}[];
|
|
372
|
-
}[];
|
|
373
|
-
};
|
|
374
|
-
right: {
|
|
375
|
-
width: NumberConstructor;
|
|
376
|
-
height: NumberConstructor;
|
|
377
|
-
marginBottom: NumberConstructor;
|
|
378
|
-
marginTop: NumberConstructor;
|
|
379
|
-
marginLeft: NumberConstructor;
|
|
380
|
-
marginRight: NumberConstructor;
|
|
381
|
-
lines: {
|
|
382
|
-
col: {
|
|
383
|
-
id: StringConstructor;
|
|
384
|
-
value: StringConstructor;
|
|
385
|
-
}[];
|
|
386
|
-
}[];
|
|
387
|
-
};
|
|
388
|
-
center: {
|
|
389
|
-
width: NumberConstructor;
|
|
390
|
-
height: NumberConstructor;
|
|
391
|
-
marginBottom: NumberConstructor;
|
|
392
|
-
marginTop: NumberConstructor;
|
|
393
|
-
marginLeft: NumberConstructor;
|
|
394
|
-
marginRight: NumberConstructor;
|
|
395
|
-
lines: {
|
|
396
|
-
col: {
|
|
397
|
-
id: StringConstructor;
|
|
398
|
-
value: StringConstructor;
|
|
399
|
-
}[];
|
|
400
|
-
}[];
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
action: NumberConstructor;
|
|
404
|
-
map: StringConstructor;
|
|
405
|
-
speed: NumberConstructor;
|
|
406
|
-
frequency: NumberConstructor;
|
|
407
|
-
canMove: BooleanConstructor;
|
|
408
|
-
through: BooleanConstructor;
|
|
409
|
-
throughOtherPlayer: BooleanConstructor;
|
|
410
|
-
width: NumberConstructor;
|
|
411
|
-
height: NumberConstructor;
|
|
412
|
-
wHitbox: NumberConstructor;
|
|
413
|
-
hHitbox: NumberConstructor;
|
|
414
|
-
_statesEfficiency: {
|
|
415
|
-
rate: {
|
|
416
|
-
$syncWithClient: boolean;
|
|
417
|
-
};
|
|
418
|
-
state: {
|
|
419
|
-
$syncWithClient: boolean;
|
|
420
|
-
};
|
|
421
|
-
}[];
|
|
422
|
-
tmpPositions: {
|
|
423
|
-
$syncWithClient: boolean;
|
|
424
|
-
};
|
|
425
|
-
initialLevel: {
|
|
426
|
-
$syncWithClient: boolean;
|
|
427
|
-
};
|
|
428
|
-
finalLevel: {
|
|
429
|
-
$syncWithClient: boolean;
|
|
430
|
-
};
|
|
431
|
-
};
|
|
432
|
-
layout: LayoutObject<any>;
|
|
433
|
-
private _name;
|
|
434
|
-
events: any;
|
|
435
|
-
param: any;
|
|
436
|
-
_rooms: never[];
|
|
437
|
-
session: string | null;
|
|
438
|
-
prevMap: string;
|
|
439
|
-
/**
|
|
440
|
-
* ```ts
|
|
441
|
-
* retreive the server instance
|
|
442
|
-
* ```
|
|
443
|
-
* @title Server Instance
|
|
444
|
-
* @prop {RpgServerEngine} player.server
|
|
445
|
-
* @deprecated Use `inject(RpgServerEngine)` instead. Will be removed in v5
|
|
446
|
-
* @memberof Player
|
|
447
|
-
* */
|
|
448
|
-
server: RpgServerEngine;
|
|
449
|
-
private touchSide;
|
|
450
|
-
otherPossessedPlayer: RpgPlayer | RpgEvent | null;
|
|
451
|
-
followingId: string | null;
|
|
452
|
-
private _dataLoading;
|
|
453
|
-
_lastFramePositions: {
|
|
454
|
-
frame: number;
|
|
455
|
-
position: Position;
|
|
456
|
-
} | undefined;
|
|
457
|
-
/**
|
|
458
|
-
* @deprecated Use `inject(RpgCommonGame)` instead. Will be removed in v5
|
|
459
|
-
*/
|
|
460
|
-
gameEngine: RpgCommonGame;
|
|
461
|
-
get otherPlayersCollision(): RpgPlayer[];
|
|
462
|
-
get world(): WorldClass | undefined;
|
|
463
|
-
teleported: number;
|
|
464
|
-
deleted: boolean;
|
|
465
|
-
constructor(playerId: string);
|
|
466
|
-
_init(): void;
|
|
467
|
-
private get schema();
|
|
468
|
-
/**
|
|
469
|
-
* ```ts
|
|
470
|
-
* player.name = 'Link'
|
|
471
|
-
* ```
|
|
472
|
-
* @title Read/Give a name
|
|
473
|
-
* @prop {string} player.name
|
|
474
|
-
* @memberof Player
|
|
475
|
-
* */
|
|
476
|
-
get name(): string;
|
|
477
|
-
set name(val: string);
|
|
478
|
-
/**
|
|
479
|
-
* Change your map. Indicate the positions to put the player at a place on the map
|
|
480
|
-
*
|
|
481
|
-
* > The map must be added to RpgServer beforehand. Guide: [Create Map](/guide/create-map.html)
|
|
482
|
-
*
|
|
483
|
-
* You don't have to give positions but you can put a starting position in the TMX file. Guide: [Start Position](/guide/player-start.html)
|
|
484
|
-
*
|
|
485
|
-
* @title Change Map
|
|
486
|
-
* @method player.changeMap(mapId,positions)
|
|
487
|
-
* @param {string} mapId
|
|
488
|
-
* @param { {x: number, y: number, z?: number} | string } [positions]
|
|
489
|
-
* @returns {Promise<RpgMap | null>} null if map not exists
|
|
490
|
-
* @memberof Player
|
|
491
|
-
*/
|
|
492
|
-
changeMap(mapId: string, positions?: {
|
|
493
|
-
x: number;
|
|
494
|
-
y: number;
|
|
495
|
-
z?: number;
|
|
496
|
-
} | string): Promise<RpgMap | null | boolean>;
|
|
497
|
-
autoChangeMap(nextPosition: Position): Promise<boolean>;
|
|
498
|
-
/**
|
|
499
|
-
* Dynamically create an event in Scenario mode on the current map
|
|
500
|
-
*
|
|
501
|
-
* ```ts
|
|
502
|
-
* @EventData({
|
|
503
|
-
* name: 'EV-1'
|
|
504
|
-
* })
|
|
505
|
-
* class MyEvent extends RpgEvent {
|
|
506
|
-
* onAction() {
|
|
507
|
-
* console.log('ok')
|
|
508
|
-
* }
|
|
509
|
-
* }
|
|
510
|
-
*
|
|
511
|
-
* player.createDynamicEvent({
|
|
512
|
-
* x: 100,
|
|
513
|
-
* y: 100,
|
|
514
|
-
* event: MyEvent
|
|
515
|
-
* })
|
|
516
|
-
* ```
|
|
517
|
-
*
|
|
518
|
-
* You can also put an array of objects to create several events at once
|
|
519
|
-
*
|
|
520
|
-
* @title Create Dynamic Event
|
|
521
|
-
* @since 3.0.0-beta.4
|
|
522
|
-
* @method player.createDynamicEvent(eventObj | eventObj[])
|
|
523
|
-
* @param { { x: number, y: number, z?: number, event: eventClass } } [eventsList]
|
|
524
|
-
* @returns { { [eventId: string]: RpgEvent } }
|
|
525
|
-
* @memberof Player
|
|
526
|
-
*/
|
|
527
|
-
createDynamicEvent(eventsList: EventPosOption | EventPosOption[], forceMode?: boolean): {
|
|
528
|
-
[eventId: string]: RpgEvent;
|
|
529
|
-
};
|
|
530
|
-
/**
|
|
531
|
-
* Allows to change the positions of the player on the current map.
|
|
532
|
-
* You can put the X and Y positions or the name of the created shape on Tiled Map Editor.
|
|
533
|
-
* If you have several shapes with the same name, one position will be chosen randomly.
|
|
534
|
-
*
|
|
535
|
-
* ```ts
|
|
536
|
-
* player.teleport({ x: 100, y: 500 })
|
|
537
|
-
* ```
|
|
538
|
-
*
|
|
539
|
-
* or
|
|
540
|
-
*
|
|
541
|
-
* ```ts
|
|
542
|
-
* player.teleport('my-shape-name')
|
|
543
|
-
* ```
|
|
544
|
-
*
|
|
545
|
-
* If no parameter:
|
|
546
|
-
*
|
|
547
|
-
* ```ts
|
|
548
|
-
* player.teleport() // { x: 0, y: 0, z: 0 }
|
|
549
|
-
* ```
|
|
550
|
-
*
|
|
551
|
-
* @title Teleport on the map
|
|
552
|
-
* @method player.teleport(positions)
|
|
553
|
-
* @param { {x: number, y: number, z?: number} | string } [positions]
|
|
554
|
-
* @returns {Promise<{ {x: number, y: number, z: number} }>}
|
|
555
|
-
* @memberof Player
|
|
556
|
-
*/
|
|
557
|
-
teleport(positions?: PositionXY_OptionalZ | string): Promise<Position>;
|
|
558
|
-
/**
|
|
559
|
-
* Load the saved data with the method save()
|
|
560
|
-
* If the player was on a map, it repositions the player on the map.
|
|
561
|
-
*
|
|
562
|
-
* ```ts
|
|
563
|
-
* const json = player.save()
|
|
564
|
-
* player.load(json)
|
|
565
|
-
* ```
|
|
566
|
-
*
|
|
567
|
-
* @title Load progress
|
|
568
|
-
* @method player.load(json)
|
|
569
|
-
* @param {string} json The JSON sent by the method save()
|
|
570
|
-
* @returns {Promise<boolean | RpgMap | null>}
|
|
571
|
-
* @memberof Player
|
|
572
|
-
*/
|
|
573
|
-
load(json: any): Promise<boolean | RpgMap | null>;
|
|
574
|
-
/**
|
|
575
|
-
* Returns a JSON with all the data to keep in memory. Then use the `load()` method to load the data
|
|
576
|
-
*
|
|
577
|
-
* You can also use the JSON.stringify
|
|
578
|
-
*
|
|
579
|
-
* ```ts
|
|
580
|
-
* const json = player.save() // or JSON.stringify(player)
|
|
581
|
-
* player.load(json)
|
|
582
|
-
* ```
|
|
583
|
-
*
|
|
584
|
-
* @title Save progress
|
|
585
|
-
* @method player.save()
|
|
586
|
-
* @returns {string}
|
|
587
|
-
* @memberof Player
|
|
588
|
-
*/
|
|
589
|
-
save(): string;
|
|
590
|
-
toObject(): {
|
|
591
|
-
direction: number;
|
|
592
|
-
id: string;
|
|
593
|
-
canMove: boolean;
|
|
594
|
-
position: {
|
|
595
|
-
x: number;
|
|
596
|
-
y: number;
|
|
597
|
-
z: number;
|
|
598
|
-
};
|
|
599
|
-
hitbox: {
|
|
600
|
-
width: any;
|
|
601
|
-
height: any;
|
|
602
|
-
};
|
|
603
|
-
map: string;
|
|
604
|
-
pendingMove: import("@rpgjs/types").PendingMove;
|
|
605
|
-
speed: number;
|
|
606
|
-
};
|
|
607
|
-
toJSON(): any;
|
|
608
|
-
/**
|
|
609
|
-
* Run the change detection cycle. Normally, as soon as a hook is called in a class, the cycle is started. But you can start it manually
|
|
610
|
-
* The method calls the `onChanges` method on events and synchronizes all map data with the client.
|
|
611
|
-
|
|
612
|
-
* @title Run Sync Changes
|
|
613
|
-
* @method player.syncChanges()
|
|
614
|
-
* @returns {void}
|
|
615
|
-
* @memberof Player
|
|
616
|
-
*/
|
|
617
|
-
syncChanges(): void;
|
|
618
|
-
databaseById(id: string): any;
|
|
619
|
-
/**
|
|
620
|
-
* Retrieves data from the current map
|
|
621
|
-
*
|
|
622
|
-
* returns null if the player is not assigned to a map
|
|
623
|
-
*
|
|
624
|
-
* @title Get Current Map
|
|
625
|
-
* @method player.getCurrentMap()
|
|
626
|
-
* @returns {RpgMap | null}
|
|
627
|
-
* @memberof Player
|
|
628
|
-
*/
|
|
629
|
-
getCurrentMap<T extends RpgMap = RpgMap>(): T | null;
|
|
630
|
-
loadScene(name: string, data: any): void;
|
|
631
|
-
emitSceneMap(): void;
|
|
632
|
-
gameReload(): void;
|
|
633
|
-
changeServer(url: string, port: number): void;
|
|
634
|
-
private _getMap;
|
|
635
|
-
/**
|
|
636
|
-
* Calls the showAnimation() method on the client side to display an animation on the player
|
|
637
|
-
* You must remember to create the spritesheet beforehand
|
|
638
|
-
*
|
|
639
|
-
* For this type of spritesheet:
|
|
640
|
-
*
|
|
641
|
-
* ```ts
|
|
642
|
-
* @Spritesheet({
|
|
643
|
-
* id: 'fire',
|
|
644
|
-
* image: require('')
|
|
645
|
-
* textures: {
|
|
646
|
-
* default: {
|
|
647
|
-
* animations: [
|
|
648
|
-
*
|
|
649
|
-
* ]
|
|
650
|
-
* }
|
|
651
|
-
* }
|
|
652
|
-
* })
|
|
653
|
-
* export class FireAnimation {}
|
|
654
|
-
* ```
|
|
655
|
-
*
|
|
656
|
-
* Here is the call of the method:
|
|
657
|
-
*
|
|
658
|
-
* ```ts
|
|
659
|
-
* player.showAnimation('fire', 'default')
|
|
660
|
-
* ```
|
|
661
|
-
*
|
|
662
|
-
* If you don't want to put an animation on top of the event but replace the event graphic with another one, set true as last parameter.
|
|
663
|
-
* This is useful, if for example, you want to make an animated character (sword stroke when pressing a key)
|
|
664
|
-
* When the animation is finished, the original graphic is displayed again
|
|
665
|
-
*
|
|
666
|
-
*
|
|
667
|
-
* ```ts
|
|
668
|
-
* player.showAnimation('sword_stroke', 'default', true)
|
|
669
|
-
* ```
|
|
670
|
-
*
|
|
671
|
-
* Since version 3.0.0-rc, you can define several graphic elements. This allows you to animate them all at once
|
|
672
|
-
*
|
|
673
|
-
* ```ts
|
|
674
|
-
* player.showAnimation(['body', 'sword_stroke'], 'default', true)
|
|
675
|
-
* ```
|
|
676
|
-
*
|
|
677
|
-
* ::: tip
|
|
678
|
-
* For this to work, the animations must have been previously defined in `setGraphic`.
|
|
679
|
-
* :::
|
|
680
|
-
*
|
|
681
|
-
* @title Show Animation
|
|
682
|
-
* @method player.showAnimation(graphic,animationName,replaceGraphic=false)
|
|
683
|
-
* @param {string | string[]} graphic spritesheet identifier
|
|
684
|
-
* @param {string} animationName Name of the animation in the spritesheet
|
|
685
|
-
* @param {boolean} [replaceGraphic] Replace the event graphic with the animation. After the end of the animation, the original graphic is reapplied
|
|
686
|
-
* @returns {void}
|
|
687
|
-
* @memberof Player
|
|
688
|
-
*/
|
|
689
|
-
showAnimation(graphic: string | string[], animationName: string, replaceGraphic?: boolean): void;
|
|
690
|
-
/**
|
|
691
|
-
* TODO:
|
|
692
|
-
* 1. It is necessary, on the client side, to make the character move even if controlled by someone else (problem: same playerId so, one will not move because of the client side prediction. Solution: create a new Id ? like session Id ?
|
|
693
|
-
* 2. You would need several sockets per character. If the character changes map or changes server, all players controlling the character must be able to see it
|
|
694
|
-
* 3. If the player regains control, what happens, do we return to the previous map?
|
|
695
|
-
* 4. If it's an event, you must be able to get the event by id in GameEngine
|
|
696
|
-
*/
|
|
697
|
-
takePossessionOf(otherPlayer: RpgPlayer | RpgEvent): void;
|
|
698
|
-
/**
|
|
699
|
-
* Sends the client which event or player the camera should follow. You can set options to perform a motion animation
|
|
700
|
-
*
|
|
701
|
-
* @title Camera Follow
|
|
702
|
-
* @method player.cameraFollow(otherPlayer,options)
|
|
703
|
-
* @param {RpgPlayer | RpgEvent} otherPlayer
|
|
704
|
-
* @param {options} options
|
|
705
|
-
* @param {object | boolean} [options.smoothMove] - animate. Set a boolean to use default parameters
|
|
706
|
-
* @param {number} [options.smoothMove.time=1000] - time to animate
|
|
707
|
-
* @param {string} [options.smoothMove.ease=linear] - easing to use. Go to https://easings.net to get function name
|
|
708
|
-
* @returns {void}
|
|
709
|
-
* @since 3.1.0
|
|
710
|
-
* @memberof Player
|
|
711
|
-
*/
|
|
712
|
-
cameraFollow(otherPlayer: RpgPlayer | RpgEvent, options?: CameraOptions): void;
|
|
713
|
-
/**
|
|
714
|
-
* Emit data to clients with socket
|
|
715
|
-
*
|
|
716
|
-
* @title Emit to client
|
|
717
|
-
* @method player.emit(key,value)
|
|
718
|
-
* @param {string} key
|
|
719
|
-
* @param {any} value
|
|
720
|
-
* @returns {void}
|
|
721
|
-
* @memberof Player
|
|
722
|
-
*/
|
|
723
|
-
emit(key: string, value?: any): void;
|
|
724
|
-
/**
|
|
725
|
-
* Listen to the data (socket) sent by the client
|
|
726
|
-
*
|
|
727
|
-
* @title Listen to data from the client
|
|
728
|
-
* @method player.on(key,cb)
|
|
729
|
-
* @param {string} key
|
|
730
|
-
* @param {function} cb
|
|
731
|
-
* @returns {void}
|
|
732
|
-
* @memberof Player
|
|
733
|
-
*/
|
|
734
|
-
on(key: string, cb: Function): void;
|
|
735
|
-
/**
|
|
736
|
-
* Adds a one-time listener function for the event named eventName
|
|
737
|
-
*
|
|
738
|
-
* @title Listen one-time to data from the client
|
|
739
|
-
* @method player.once(key,cb)
|
|
740
|
-
* @since 3.0.0-beta.5
|
|
741
|
-
* @param {string} key
|
|
742
|
-
* @param {function} cb
|
|
743
|
-
* @returns {void}
|
|
744
|
-
* @memberof Player
|
|
745
|
-
*/
|
|
746
|
-
once(key: string, cb: Function): void;
|
|
747
|
-
/**
|
|
748
|
-
* Removes all listeners of the specified eventName.
|
|
749
|
-
*
|
|
750
|
-
* @title Removes all listeners of the client
|
|
751
|
-
* @method player.off(key)
|
|
752
|
-
* @since 3.0.0-beta.5
|
|
753
|
-
* @param {string} key
|
|
754
|
-
* @returns {void}
|
|
755
|
-
* @memberof Player
|
|
756
|
-
*/
|
|
757
|
-
off(key: string): void;
|
|
758
|
-
disconnect(): void;
|
|
759
|
-
emitToMap(key: string, value: any): void;
|
|
760
|
-
private execMethodSync;
|
|
761
|
-
execMethod(methodName: string, methodData?: never[], target?: any): Promise<any>;
|
|
762
|
-
_triggerHook(name: any, val?: any): void;
|
|
763
|
-
private _eventChanges;
|
|
764
|
-
/**
|
|
765
|
-
* Allows to play a sound, heard only by the player or by the players of the map
|
|
766
|
-
*
|
|
767
|
-
* Here is a sound, client side:
|
|
768
|
-
*
|
|
769
|
-
* ```ts
|
|
770
|
-
* import { Sound } from '@rpgjs/client'
|
|
771
|
-
* @Sound({
|
|
772
|
-
* id: 'town-music',
|
|
773
|
-
* sound: require('./sound/town.ogg')
|
|
774
|
-
* })
|
|
775
|
-
* export class TownMusic {}
|
|
776
|
-
* ```
|
|
777
|
-
*
|
|
778
|
-
* Here is the call of the method, server side:
|
|
779
|
-
*
|
|
780
|
-
* ```ts
|
|
781
|
-
* player.playSound('town-music')
|
|
782
|
-
* ```
|
|
783
|
-
*
|
|
784
|
-
* If you want everyone to listen to the sound on the map:
|
|
785
|
-
*
|
|
786
|
-
* ```ts
|
|
787
|
-
* player.playSound('town-music', true)
|
|
788
|
-
* ```
|
|
789
|
-
*
|
|
790
|
-
* @title Play Sound
|
|
791
|
-
* @method player.playSound(soundId,allMap=false)
|
|
792
|
-
* @param {string} soundId Sound identifier, defined on the client side
|
|
793
|
-
* @param {boolean} [forEveryone=false] Indicate if the sound is heard by the players on the map
|
|
794
|
-
* @since 3.0.0-alpha.9
|
|
795
|
-
* @returns {void}
|
|
796
|
-
* @memberof Player
|
|
797
|
-
*/
|
|
798
|
-
playSound(soundId: string, forEveryone?: boolean): void;
|
|
799
|
-
}
|
|
800
|
-
export interface RpgPlayer extends EventManager, ItemManager, GoldManager, StateManager, SkillManager, ParameterManager, EffectManager, ClassManager, ElementManager, GuiManager, VariableManager, MoveManager, BattleManager, ComponentManager {
|
|
801
|
-
_socket: any;
|
|
802
|
-
vision: any;
|
|
803
|
-
attachShape: any;
|
|
804
|
-
}
|
|
805
|
-
export interface RpgClassEvent<T> {
|
|
806
|
-
_name: string;
|
|
807
|
-
new (): T;
|
|
808
|
-
}
|
|
809
|
-
export declare class RpgEvent extends RpgPlayer {
|
|
810
|
-
readonly type: string;
|
|
811
|
-
properties: any;
|
|
812
|
-
mode: EventMode;
|
|
813
|
-
playerRelated: RpgPlayer | null;
|
|
814
|
-
constructor(playerId: string);
|
|
815
|
-
execMethod(methodName: string, methodData?: never[]): Promise<any>;
|
|
816
|
-
changeRoomState(path: string): void;
|
|
817
|
-
/**
|
|
818
|
-
* Deletes the event from the map (in shared or scenario mode)
|
|
819
|
-
*
|
|
820
|
-
* @title Remove
|
|
821
|
-
* @since 4.0.0
|
|
822
|
-
* @method event.remove()
|
|
823
|
-
* @returns {boolean} true if the event has been removed. If false, the event is not on the map
|
|
824
|
-
* @memberof RpgEvent
|
|
825
|
-
*/
|
|
826
|
-
remove(): boolean;
|
|
827
|
-
emitToMap(key: string, value: any): void;
|
|
828
|
-
}
|