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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"eventDrivenSystem": {
|
4 |
+
"metadata": {
|
5 |
+
"version": "1.0.0",
|
6 |
+
"lastModified": "2024-02-02",
|
7 |
+
"description": "Event-driven architecture for ShooterGTU game",
|
8 |
+
"author": "FeadHD",
|
9 |
+
"dependencies": {
|
10 |
+
"required": [
|
11 |
+
{
|
12 |
+
"name": "Phaser",
|
13 |
+
"version": "3.x",
|
14 |
+
"purpose": "Game engine and event system foundation"
|
15 |
+
}
|
16 |
+
],
|
17 |
+
"optional": [
|
18 |
+
{
|
19 |
+
"name": "WebFont",
|
20 |
+
"version": "1.x",
|
21 |
+
"purpose": "Font loading for UI elements"
|
22 |
+
}
|
23 |
+
]
|
24 |
+
}
|
25 |
+
},
|
26 |
+
"core": {
|
27 |
+
"ServiceContainer": {
|
28 |
+
"id": "servicecontainer_01",
|
29 |
+
"role": "Dependency Injection Container",
|
30 |
+
"location": "managers/core/ServiceContainer.js",
|
31 |
+
"extends": null,
|
32 |
+
"imports": [],
|
33 |
+
"emits": [],
|
34 |
+
"listensTo": [],
|
35 |
+
"features": [
|
36 |
+
"Centralized service registry",
|
37 |
+
"Dependency injection support",
|
38 |
+
"Global singleton pattern"
|
39 |
+
],
|
40 |
+
"methods": {
|
41 |
+
"register": "Register new services with unique keys",
|
42 |
+
"get": "Retrieve services by their keys"
|
43 |
+
},
|
44 |
+
"dependencies": {
|
45 |
+
"core": [],
|
46 |
+
"managers": [],
|
47 |
+
"runtime": {
|
48 |
+
"required": [],
|
49 |
+
"optional": []
|
50 |
+
},
|
51 |
+
"assets": {}
|
52 |
+
},
|
53 |
+
"notes": [
|
54 |
+
"Core foundation for dependency injection",
|
55 |
+
"Enables loose coupling between components",
|
56 |
+
"Facilitates service location and management"
|
57 |
+
],
|
58 |
+
"usedBy": [
|
59 |
+
"BaseManager",
|
60 |
+
"ManagerFactory",
|
61 |
+
"All manager classes through inheritance"
|
62 |
+
],
|
63 |
+
"creates": [],
|
64 |
+
"events": {}
|
65 |
+
},
|
66 |
+
"BaseManager": {
|
67 |
+
"id": "basemanager_01",
|
68 |
+
"role": "Base Manager Class",
|
69 |
+
"location": "managers/core/BaseManager.js",
|
70 |
+
"extends": null,
|
71 |
+
"imports": [
|
72 |
+
"ServiceContainer"
|
73 |
+
],
|
74 |
+
"emits": [],
|
75 |
+
"listensTo": [],
|
76 |
+
"features": [
|
77 |
+
"Base dependency injection functionality",
|
78 |
+
"Common manager utilities",
|
79 |
+
"Scene access methods"
|
80 |
+
],
|
81 |
+
"methods": {
|
82 |
+
"getScene": "Access current game scene",
|
83 |
+
"getManager": "Get other manager instances"
|
84 |
+
},
|
85 |
+
"dependencies": {
|
86 |
+
"core": [
|
87 |
+
"ServiceContainer"
|
88 |
+
],
|
89 |
+
"managers": [],
|
90 |
+
"runtime": {
|
91 |
+
"required": [
|
92 |
+
"Phaser.Scene"
|
93 |
+
],
|
94 |
+
"optional": []
|
95 |
+
},
|
96 |
+
"assets": {}
|
97 |
+
},
|
98 |
+
"notes": [
|
99 |
+
"Base class for all managers",
|
100 |
+
"Provides dependency injection support",
|
101 |
+
"Manages service access and scene references"
|
102 |
+
],
|
103 |
+
"extendedBy": [
|
104 |
+
"EventManager",
|
105 |
+
"UIManager",
|
106 |
+
"EntityManager",
|
107 |
+
"GameStateManager",
|
108 |
+
"HazardManager",
|
109 |
+
"CollisionManager",
|
110 |
+
"EnemyManager"
|
111 |
+
],
|
112 |
+
"creates": [],
|
113 |
+
"events": {},
|
114 |
+
"usedBy": []
|
115 |
+
},
|
116 |
+
"EventManager": {
|
117 |
+
"id": "eventmanager_01",
|
118 |
+
"role": "Central Event Bus",
|
119 |
+
"location": "managers/core/EventManager.js",
|
120 |
+
"extends": "BaseManager",
|
121 |
+
"imports": [
|
122 |
+
"BaseManager"
|
123 |
+
],
|
124 |
+
"emits": [
|
125 |
+
"SCENE_READY",
|
126 |
+
"GAME_STATE_INITIALIZED"
|
127 |
+
],
|
128 |
+
"listensTo": [],
|
129 |
+
"features": [
|
130 |
+
"Extends BaseManager for dependency injection",
|
131 |
+
"Provides GameEvents constants",
|
132 |
+
"Handles event registration and emission",
|
133 |
+
"Manages event lifecycle and cleanup"
|
134 |
+
],
|
135 |
+
"methods": {
|
136 |
+
"on": "Register event handler",
|
137 |
+
"once": "Register one-time event handler",
|
138 |
+
"emit": "Emit event with data",
|
139 |
+
"off": "Remove specific event handler",
|
140 |
+
"removeAllListeners": "Remove all handlers for event",
|
141 |
+
"destroy": "Clean up all event handlers"
|
142 |
+
},
|
143 |
+
"dependencies": {
|
144 |
+
"core": [
|
145 |
+
"Phaser.Events"
|
146 |
+
],
|
147 |
+
"managers": [],
|
148 |
+
"runtime": {
|
149 |
+
"required": [
|
150 |
+
"Phaser.Events.EventEmitter"
|
151 |
+
],
|
152 |
+
"optional": []
|
153 |
+
},
|
154 |
+
"assets": {}
|
155 |
+
},
|
156 |
+
"notes": [
|
157 |
+
"Core component responsible for all event communication",
|
158 |
+
"Uses Phaser's event system under the hood",
|
159 |
+
"Implements cleanup to prevent memory leaks"
|
160 |
+
],
|
161 |
+
"creates": [],
|
162 |
+
"usedBy": [],
|
163 |
+
"extendedBy": [],
|
164 |
+
"events": {
|
165 |
+
"entityLifecycle": [
|
166 |
+
"PLAYER_DEATH",
|
167 |
+
"PLAYER_RESPAWN",
|
168 |
+
"ENEMY_DEATH",
|
169 |
+
"ENEMY_SPAWN",
|
170 |
+
"BOSS_SPAWN",
|
171 |
+
"BOSS_PHASE_CHANGE"
|
172 |
+
],
|
173 |
+
"gameplayState": [
|
174 |
+
"SCORE_CHANGE",
|
175 |
+
"HEALTH_CHANGE",
|
176 |
+
"CHECKPOINT_REACHED",
|
177 |
+
"GAME_OVER",
|
178 |
+
"HAZARD_COLLISION",
|
179 |
+
"GAME_STATE_INITIALIZED",
|
180 |
+
"GAME_STATE_CHANGED",
|
181 |
+
"PLAYER_HP_CHANGED"
|
182 |
+
],
|
183 |
+
"entityEvents": [
|
184 |
+
"ENEMY_HEALTH_CHANGED",
|
185 |
+
"ENTITY_ADDED",
|
186 |
+
"ENTITY_REMOVED"
|
187 |
+
],
|
188 |
+
"itemEvents": [
|
189 |
+
"ITEM_PICKUP",
|
190 |
+
"ITEM_USE",
|
191 |
+
"POWERUP_START",
|
192 |
+
"POWERUP_END"
|
193 |
+
],
|
194 |
+
"systemEvents": [
|
195 |
+
"SCENE_READY",
|
196 |
+
"RESOURCES_LOADED",
|
197 |
+
"ERROR_OCCURRED"
|
198 |
+
]
|
199 |
+
}
|
200 |
+
}
|
201 |
+
},
|
202 |
+
"hierarchy": {
|
203 |
+
"sceneLayer": {
|
204 |
+
"WayneWorld": {
|
205 |
+
"id": "wayneworld_01",
|
206 |
+
"role": "Game Level Scene 1",
|
207 |
+
"location": "scenes/WayneWorld.js",
|
208 |
+
"extends": "BaseScene",
|
209 |
+
"imports": [
|
210 |
+
"ManagerFactory"
|
211 |
+
],
|
212 |
+
"emits": [],
|
213 |
+
"listensTo": [
|
214 |
+
"SCENE_READY",
|
215 |
+
"GAME_STATE_INITIALIZED"
|
216 |
+
],
|
217 |
+
"features": [
|
218 |
+
"Main game level implementation",
|
219 |
+
"Level-specific logic and events",
|
220 |
+
"Asset management and scene setup"
|
221 |
+
],
|
222 |
+
"methods": {
|
223 |
+
"create": "Initialize level and assets",
|
224 |
+
"update": "Handle game loop logic",
|
225 |
+
"destroy": "Clean up resources"
|
226 |
+
},
|
227 |
+
"dependencies": {
|
228 |
+
"core": [
|
229 |
+
"Phaser.Scene",
|
230 |
+
"BaseScene"
|
231 |
+
],
|
232 |
+
"managers": [
|
233 |
+
"EntityManager",
|
234 |
+
"GameStateManager",
|
235 |
+
"UIManager"
|
236 |
+
],
|
237 |
+
"assets": {
|
238 |
+
"sprites": [
|
239 |
+
"GtuTileset"
|
240 |
+
],
|
241 |
+
"backgrounds": [
|
242 |
+
"bg-1",
|
243 |
+
"bg-2",
|
244 |
+
"bg-3",
|
245 |
+
"bg-4",
|
246 |
+
"bg-5",
|
247 |
+
"bg-6",
|
248 |
+
"bg-7",
|
249 |
+
"bg-8",
|
250 |
+
"bg-9"
|
251 |
+
]
|
252 |
+
},
|
253 |
+
"runtime": {
|
254 |
+
"required": [],
|
255 |
+
"optional": []
|
256 |
+
}
|
257 |
+
},
|
258 |
+
"notes": [
|
259 |
+
"Main game level implementation",
|
260 |
+
"Handles level-specific logic and events"
|
261 |
+
],
|
262 |
+
"usedBy": [],
|
263 |
+
"creates": [],
|
264 |
+
"events": {},
|
265 |
+
"extendedBy": []
|
266 |
+
},
|
267 |
+
"BaseScene": {
|
268 |
+
"id": "basescene_01",
|
269 |
+
"role": "Base Scene Template",
|
270 |
+
"location": "scenes/BaseScene.js",
|
271 |
+
"extends": "Phaser.Scene",
|
272 |
+
"imports": [
|
273 |
+
"ManagerFactory",
|
274 |
+
"EventManager"
|
275 |
+
],
|
276 |
+
"emits": [
|
277 |
+
"SCENE_READY",
|
278 |
+
"GAME_STATE_INITIALIZED"
|
279 |
+
],
|
280 |
+
"listensTo": [],
|
281 |
+
"features": [
|
282 |
+
"Base scene template for all game scenes",
|
283 |
+
"Provides basic scene functionality"
|
284 |
+
],
|
285 |
+
"methods": {
|
286 |
+
"create": "Initialize scene and assets",
|
287 |
+
"update": "Handle game loop logic",
|
288 |
+
"destroy": "Clean up resources"
|
289 |
+
},
|
290 |
+
"dependencies": {
|
291 |
+
"core": [
|
292 |
+
"Phaser.Scene"
|
293 |
+
],
|
294 |
+
"managers": [
|
295 |
+
"ManagerFactory",
|
296 |
+
"EventManager"
|
297 |
+
],
|
298 |
+
"runtime": {
|
299 |
+
"required": [
|
300 |
+
"Phaser.Game"
|
301 |
+
],
|
302 |
+
"optional": []
|
303 |
+
},
|
304 |
+
"assets": {}
|
305 |
+
},
|
306 |
+
"notes": [
|
307 |
+
"Base scene template for all game scenes",
|
308 |
+
"Provides basic scene functionality"
|
309 |
+
],
|
310 |
+
"usedBy": [],
|
311 |
+
"creates": [],
|
312 |
+
"events": {},
|
313 |
+
"extendedBy": []
|
314 |
+
}
|
315 |
+
},
|
316 |
+
"managerLayer": {
|
317 |
+
"ManagerFactory": {
|
318 |
+
"id": "managerfactory_01",
|
319 |
+
"role": "Manager Creation and DI Container",
|
320 |
+
"location": "managers/ManagerFactory.js",
|
321 |
+
"extends": null,
|
322 |
+
"imports": [
|
323 |
+
"EventManager"
|
324 |
+
],
|
325 |
+
"emits": [],
|
326 |
+
"listensTo": [],
|
327 |
+
"features": [
|
328 |
+
"Handles dependency injection",
|
329 |
+
"Manager lifecycle control",
|
330 |
+
"Singleton pattern implementation"
|
331 |
+
],
|
332 |
+
"methods": {
|
333 |
+
"createManager": "Create new manager instance",
|
334 |
+
"getManager": "Get existing manager instance",
|
335 |
+
"destroyManager": "Clean up manager instance"
|
336 |
+
},
|
337 |
+
"dependencies": {
|
338 |
+
"core": [
|
339 |
+
"Phaser.Scene"
|
340 |
+
],
|
341 |
+
"managers": [
|
342 |
+
"EventManager"
|
343 |
+
],
|
344 |
+
"runtime": {
|
345 |
+
"required": [
|
346 |
+
"Phaser.Scene",
|
347 |
+
"EventManager"
|
348 |
+
],
|
349 |
+
"optional": []
|
350 |
+
},
|
351 |
+
"assets": {}
|
352 |
+
},
|
353 |
+
"notes": [
|
354 |
+
"Handles dependency injection and manager lifecycle",
|
355 |
+
"Ensures proper initialization order",
|
356 |
+
"Maintains singleton instances of managers"
|
357 |
+
],
|
358 |
+
"usedBy": [],
|
359 |
+
"creates": [
|
360 |
+
"EventManager",
|
361 |
+
"UIManager",
|
362 |
+
"Player",
|
363 |
+
"EntityManager",
|
364 |
+
"GameStateManager",
|
365 |
+
"HazardManager",
|
366 |
+
"CollisionManager",
|
367 |
+
"EnemyManager"
|
368 |
+
],
|
369 |
+
"events": {}
|
370 |
+
}
|
371 |
+
},
|
372 |
+
"componentLayer": {
|
373 |
+
"emitters": {
|
374 |
+
"Player": {
|
375 |
+
"id": "player_01",
|
376 |
+
"role": "Player Entity Controller",
|
377 |
+
"location": "components/Player.js",
|
378 |
+
"extends": "Phaser.GameObjects.Sprite",
|
379 |
+
"imports": [
|
380 |
+
"EventManager"
|
381 |
+
],
|
382 |
+
"emits": [
|
383 |
+
"PLAYER_DEATH",
|
384 |
+
"HEALTH_CHANGE",
|
385 |
+
"PLAYER_HP_CHANGED"
|
386 |
+
],
|
387 |
+
"listensTo": [
|
388 |
+
"HAZARD_COLLISION"
|
389 |
+
],
|
390 |
+
"features": [
|
391 |
+
"Handles player input and state",
|
392 |
+
"Manages player animations and physics",
|
393 |
+
"Emits events for player state changes"
|
394 |
+
],
|
395 |
+
"methods": {
|
396 |
+
"update": "Handle player movement and animation",
|
397 |
+
"destroy": "Clean up player resources"
|
398 |
+
},
|
399 |
+
"dependencies": {
|
400 |
+
"core": [
|
401 |
+
"Phaser.GameObjects.Sprite",
|
402 |
+
"Phaser.Input"
|
403 |
+
],
|
404 |
+
"managers": [
|
405 |
+
"EventManager"
|
406 |
+
],
|
407 |
+
"runtime": {
|
408 |
+
"required": [
|
409 |
+
"Phaser.Physics",
|
410 |
+
"EventManager"
|
411 |
+
],
|
412 |
+
"optional": [
|
413 |
+
"ProceduralSoundGenerator"
|
414 |
+
]
|
415 |
+
},
|
416 |
+
"assets": {
|
417 |
+
"sprites": {
|
418 |
+
"player": {
|
419 |
+
"dimensions": "48x48",
|
420 |
+
"animations": [
|
421 |
+
{
|
422 |
+
"name": "idle",
|
423 |
+
"frames": 4
|
424 |
+
},
|
425 |
+
{
|
426 |
+
"name": "walk",
|
427 |
+
"frames": 6
|
428 |
+
},
|
429 |
+
{
|
430 |
+
"name": "jump",
|
431 |
+
"frames": 1
|
432 |
+
},
|
433 |
+
{
|
434 |
+
"name": "death",
|
435 |
+
"frames": 8
|
436 |
+
},
|
437 |
+
{
|
438 |
+
"name": "fall",
|
439 |
+
"frames": 1
|
440 |
+
},
|
441 |
+
{
|
442 |
+
"name": "roll",
|
443 |
+
"frames": 3
|
444 |
+
}
|
445 |
+
]
|
446 |
+
}
|
447 |
+
},
|
448 |
+
"audio": [
|
449 |
+
"hit.wav"
|
450 |
+
]
|
451 |
+
}
|
452 |
+
},
|
453 |
+
"notes": [
|
454 |
+
"Handles player input and state",
|
455 |
+
"Manages player animations and physics",
|
456 |
+
"Emits events for player state changes"
|
457 |
+
],
|
458 |
+
"usedBy": [],
|
459 |
+
"creates": [],
|
460 |
+
"events": {}
|
461 |
+
},
|
462 |
+
"EntityManager": {
|
463 |
+
"id": "entitymanager_01",
|
464 |
+
"role": "Entity Lifecycle Manager",
|
465 |
+
"location": "managers/EntityManager.js",
|
466 |
+
"extends": "BaseManager",
|
467 |
+
"imports": [
|
468 |
+
"EventManager"
|
469 |
+
],
|
470 |
+
"emits": [
|
471 |
+
"ENTITY_ADDED",
|
472 |
+
"ENTITY_REMOVED"
|
473 |
+
],
|
474 |
+
"listensTo": [
|
475 |
+
"ENEMY_DEATH",
|
476 |
+
"PLAYER_DEATH"
|
477 |
+
],
|
478 |
+
"features": [
|
479 |
+
"Manages entity lifecycle and state",
|
480 |
+
"Handles entity creation and removal",
|
481 |
+
"Emits events for entity state changes"
|
482 |
+
],
|
483 |
+
"methods": {
|
484 |
+
"addEntity": "Add new entity to the game",
|
485 |
+
"removeEntity": "Remove entity from the game",
|
486 |
+
"update": "Handle entity updates"
|
487 |
+
},
|
488 |
+
"dependencies": {
|
489 |
+
"core": [
|
490 |
+
"BaseManager"
|
491 |
+
],
|
492 |
+
"managers": [
|
493 |
+
"EventManager"
|
494 |
+
],
|
495 |
+
"components": [
|
496 |
+
"Player",
|
497 |
+
"Enemy"
|
498 |
+
],
|
499 |
+
"runtime": {
|
500 |
+
"required": [
|
501 |
+
"Phaser.GameObjects.Group"
|
502 |
+
],
|
503 |
+
"optional": []
|
504 |
+
},
|
505 |
+
"assets": {}
|
506 |
+
},
|
507 |
+
"notes": [
|
508 |
+
"Manages entity lifecycle and state",
|
509 |
+
"Handles entity creation and removal",
|
510 |
+
"Emits events for entity state changes"
|
511 |
+
],
|
512 |
+
"usedBy": [],
|
513 |
+
"creates": [],
|
514 |
+
"events": {}
|
515 |
+
},
|
516 |
+
"GameStateManager": {
|
517 |
+
"id": "gamestatemanager_01",
|
518 |
+
"role": "Game State Controller",
|
519 |
+
"location": "managers/GameStateManager.js",
|
520 |
+
"extends": "BaseManager",
|
521 |
+
"imports": [
|
522 |
+
"EventManager"
|
523 |
+
],
|
524 |
+
"emits": [
|
525 |
+
"GAME_STATE_CHANGED",
|
526 |
+
"GAME_STATE_INITIALIZED"
|
527 |
+
],
|
528 |
+
"listensTo": [
|
529 |
+
"PLAYER_DEATH",
|
530 |
+
"BOSS_SPAWN"
|
531 |
+
],
|
532 |
+
"features": [
|
533 |
+
"Manages game state and transitions",
|
534 |
+
"Handles game state initialization",
|
535 |
+
"Emits events for game state changes"
|
536 |
+
],
|
537 |
+
"methods": {
|
538 |
+
"initialize": "Initialize game state",
|
539 |
+
"update": "Handle game state updates",
|
540 |
+
"destroy": "Clean up game state resources"
|
541 |
+
},
|
542 |
+
"dependencies": {
|
543 |
+
"core": [
|
544 |
+
"BaseManager"
|
545 |
+
],
|
546 |
+
"managers": [
|
547 |
+
"EventManager",
|
548 |
+
"UIManager"
|
549 |
+
],
|
550 |
+
"runtime": {
|
551 |
+
"required": [],
|
552 |
+
"optional": []
|
553 |
+
},
|
554 |
+
"assets": {}
|
555 |
+
},
|
556 |
+
"notes": [
|
557 |
+
"Manages game state and transitions",
|
558 |
+
"Handles game state initialization",
|
559 |
+
"Emits events for game state changes"
|
560 |
+
],
|
561 |
+
"usedBy": [],
|
562 |
+
"creates": [],
|
563 |
+
"events": {}
|
564 |
+
},
|
565 |
+
"HazardManager": {
|
566 |
+
"id": "hazardmanager_01",
|
567 |
+
"role": "Hazard Controller",
|
568 |
+
"location": "managers/HazardManager.js",
|
569 |
+
"extends": "BaseManager",
|
570 |
+
"imports": [
|
571 |
+
"EventManager"
|
572 |
+
],
|
573 |
+
"emits": [
|
574 |
+
"HAZARD_COLLISION"
|
575 |
+
],
|
576 |
+
"listensTo": [],
|
577 |
+
"features": [
|
578 |
+
"Manages hazard creation and removal",
|
579 |
+
"Handles hazard collision detection",
|
580 |
+
"Emits events for hazard collisions"
|
581 |
+
],
|
582 |
+
"methods": {
|
583 |
+
"addHazard": "Add new hazard to the game",
|
584 |
+
"removeHazard": "Remove hazard from the game",
|
585 |
+
"update": "Handle hazard updates"
|
586 |
+
},
|
587 |
+
"dependencies": {
|
588 |
+
"core": [
|
589 |
+
"BaseManager",
|
590 |
+
"Phaser.Physics"
|
591 |
+
],
|
592 |
+
"managers": [
|
593 |
+
"EventManager",
|
594 |
+
"CollisionManager"
|
595 |
+
],
|
596 |
+
"runtime": {
|
597 |
+
"required": [
|
598 |
+
"Phaser.Physics.Arcade"
|
599 |
+
],
|
600 |
+
"optional": []
|
601 |
+
},
|
602 |
+
"assets": {}
|
603 |
+
},
|
604 |
+
"notes": [
|
605 |
+
"Manages hazard creation and removal",
|
606 |
+
"Handles hazard collision detection",
|
607 |
+
"Emits events for hazard collisions"
|
608 |
+
],
|
609 |
+
"usedBy": [],
|
610 |
+
"creates": [],
|
611 |
+
"events": {}
|
612 |
+
},
|
613 |
+
"EnemyManager": {
|
614 |
+
"id": "enemymanager_01",
|
615 |
+
"role": "Enemy Controller",
|
616 |
+
"location": "managers/EnemyManager.js",
|
617 |
+
"extends": "BaseManager",
|
618 |
+
"imports": [
|
619 |
+
"EventManager"
|
620 |
+
],
|
621 |
+
"emits": [
|
622 |
+
"ENEMY_DEATH",
|
623 |
+
"ENEMY_SPAWN",
|
624 |
+
"ENEMY_HEALTH_CHANGED"
|
625 |
+
],
|
626 |
+
"listensTo": [
|
627 |
+
"PLAYER_DEATH",
|
628 |
+
"GAME_STATE_CHANGED"
|
629 |
+
],
|
630 |
+
"features": [
|
631 |
+
"Manages enemy creation and removal",
|
632 |
+
"Handles enemy AI and behavior",
|
633 |
+
"Emits events for enemy state changes"
|
634 |
+
],
|
635 |
+
"methods": {
|
636 |
+
"addEnemy": "Add new enemy to the game",
|
637 |
+
"removeEnemy": "Remove enemy from the game",
|
638 |
+
"update": "Handle enemy updates"
|
639 |
+
},
|
640 |
+
"dependencies": {
|
641 |
+
"core": [
|
642 |
+
"BaseManager",
|
643 |
+
"Phaser.Physics"
|
644 |
+
],
|
645 |
+
"managers": [
|
646 |
+
"EventManager",
|
647 |
+
"CollisionManager"
|
648 |
+
],
|
649 |
+
"assets": {
|
650 |
+
"sprites": {
|
651 |
+
"enemy": {
|
652 |
+
"dimensions": "48x48",
|
653 |
+
"animations": [
|
654 |
+
"idle",
|
655 |
+
"attack",
|
656 |
+
"death"
|
657 |
+
]
|
658 |
+
}
|
659 |
+
}
|
660 |
+
},
|
661 |
+
"runtime": {
|
662 |
+
"required": [
|
663 |
+
"Phaser.Physics.Arcade"
|
664 |
+
],
|
665 |
+
"optional": []
|
666 |
+
}
|
667 |
+
},
|
668 |
+
"notes": [
|
669 |
+
"Manages enemy creation and removal",
|
670 |
+
"Handles enemy AI and behavior",
|
671 |
+
"Emits events for enemy state changes"
|
672 |
+
],
|
673 |
+
"usedBy": [],
|
674 |
+
"creates": [],
|
675 |
+
"events": {}
|
676 |
+
},
|
677 |
+
"CollisionManager": {
|
678 |
+
"id": "collisionmanager_01",
|
679 |
+
"role": "Collision Handler",
|
680 |
+
"location": "managers/CollisionManager.js",
|
681 |
+
"extends": "BaseManager",
|
682 |
+
"imports": [
|
683 |
+
"EventManager"
|
684 |
+
],
|
685 |
+
"emits": [
|
686 |
+
"HAZARD_COLLISION"
|
687 |
+
],
|
688 |
+
"listensTo": [
|
689 |
+
"ENTITY_ADDED",
|
690 |
+
"ENTITY_REMOVED"
|
691 |
+
],
|
692 |
+
"features": [
|
693 |
+
"Handles collision detection and response",
|
694 |
+
"Manages collision groups and masks",
|
695 |
+
"Emits events for collisions"
|
696 |
+
],
|
697 |
+
"methods": {
|
698 |
+
"checkCollisions": "Check for collisions between entities",
|
699 |
+
"handleCollision": "Handle collision response",
|
700 |
+
"update": "Handle collision updates"
|
701 |
+
},
|
702 |
+
"dependencies": {
|
703 |
+
"core": [
|
704 |
+
"BaseManager",
|
705 |
+
"Phaser.Physics"
|
706 |
+
],
|
707 |
+
"managers": [
|
708 |
+
"EventManager",
|
709 |
+
"EntityManager"
|
710 |
+
],
|
711 |
+
"runtime": {
|
712 |
+
"required": [
|
713 |
+
"Phaser.Physics.Arcade"
|
714 |
+
],
|
715 |
+
"optional": []
|
716 |
+
},
|
717 |
+
"assets": {}
|
718 |
+
},
|
719 |
+
"notes": [
|
720 |
+
"Handles collision detection and response",
|
721 |
+
"Manages collision groups and masks",
|
722 |
+
"Emits events for collisions"
|
723 |
+
],
|
724 |
+
"usedBy": [],
|
725 |
+
"creates": [],
|
726 |
+
"events": {}
|
727 |
+
}
|
728 |
+
},
|
729 |
+
"listeners": {
|
730 |
+
"UIManager": {
|
731 |
+
"id": "uimanager_01",
|
732 |
+
"role": "UI State Manager",
|
733 |
+
"location": "managers/UIManager.js",
|
734 |
+
"extends": "BaseManager",
|
735 |
+
"imports": [
|
736 |
+
"EventManager"
|
737 |
+
],
|
738 |
+
"emits": [],
|
739 |
+
"listensTo": [
|
740 |
+
"HEALTH_CHANGE",
|
741 |
+
"SCORE_CHANGE",
|
742 |
+
"GAME_STATE_CHANGED",
|
743 |
+
"PLAYER_HP_CHANGED"
|
744 |
+
],
|
745 |
+
"features": [
|
746 |
+
"Manages UI state and updates",
|
747 |
+
"Handles UI events and input",
|
748 |
+
"Listens to game state changes"
|
749 |
+
],
|
750 |
+
"methods": {
|
751 |
+
"updateUI": "Update UI state",
|
752 |
+
"handleInput": "Handle UI input",
|
753 |
+
"destroy": "Clean up UI resources"
|
754 |
+
},
|
755 |
+
"dependencies": {
|
756 |
+
"core": [
|
757 |
+
"BaseManager"
|
758 |
+
],
|
759 |
+
"managers": [
|
760 |
+
"EventManager"
|
761 |
+
],
|
762 |
+
"assets": {
|
763 |
+
"fonts": [
|
764 |
+
"Gameplay.ttf",
|
765 |
+
"Retronoid"
|
766 |
+
],
|
767 |
+
"audio": [
|
768 |
+
"confirmation.mp3"
|
769 |
+
]
|
770 |
+
},
|
771 |
+
"runtime": {
|
772 |
+
"required": [
|
773 |
+
"WebFont"
|
774 |
+
],
|
775 |
+
"optional": []
|
776 |
+
}
|
777 |
+
},
|
778 |
+
"notes": [
|
779 |
+
"Manages UI state and updates",
|
780 |
+
"Handles UI events and input",
|
781 |
+
"Listens to game state changes"
|
782 |
+
],
|
783 |
+
"usedBy": [],
|
784 |
+
"creates": [],
|
785 |
+
"events": {}
|
786 |
+
}
|
787 |
+
}
|
788 |
+
}
|
789 |
+
},
|
790 |
+
"systemNotes": [
|
791 |
+
"Event-driven architecture ensures loose coupling between components",
|
792 |
+
"Managers use dependency injection for better testability",
|
793 |
+
"Event system supports both sync and async event handling",
|
794 |
+
"Components can be both emitters and listeners",
|
795 |
+
"Event naming follows consistent convention: CATEGORY_ACTION",
|
796 |
+
"All events are documented in GameEvents constant"
|
797 |
+
],
|
798 |
+
"bestPractices": [
|
799 |
+
"Always use GameEvents constants instead of string literals",
|
800 |
+
"Clean up event listeners in destroy() methods",
|
801 |
+
"Avoid circular event dependencies",
|
802 |
+
"Document all new events in GameEvents",
|
803 |
+
"Use typed event payloads for better maintainability and code readability"
|
804 |
+
]
|
805 |
+
}
|
806 |
+
}
|
807 |
+
]
|