brick-engine-js 1.0.21 → 1.0.23
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/README.adoc +2 -2
- package/dist/docs/index.html +3 -3
- package/dist/docs/jsdoc_standard.html +30 -13
- package/dist/docs/reference/bootstrap.html +556 -0
- package/dist/docs/reference/context/RendererContext.html +19 -9
- package/dist/docs/reference/enums/Color.html +11 -5
- package/dist/docs/reference/enums/ControlEventType.html +7 -5
- package/dist/docs/reference/enums/ControlKey.html +7 -5
- package/dist/docs/reference/enums/EventSuffix.html +7 -5
- package/dist/docs/reference/enums/FontAlignment.html +9 -7
- package/dist/docs/reference/enums/FontSize.html +7 -5
- package/dist/docs/reference/enums/Sound.html +7 -5
- package/dist/docs/reference/enums/StateProperty.html +7 -5
- package/dist/docs/reference/helpers/CellHelper.html +6 -2
- package/dist/docs/reference/helpers/ControlInputHandlerHelper.html +9 -5
- package/dist/docs/reference/helpers/CoordinateHelper.html +14 -10
- package/dist/docs/reference/helpers/RelativeValuesHelper.html +7 -3
- package/dist/docs/reference/interfaces/Debuggable.html +9 -7
- package/dist/docs/reference/interfaces/GameModules.html +7 -5
- package/dist/docs/reference/interfaces/Initializable.html +9 -7
- package/dist/docs/reference/interfaces/RendererInitializable.html +9 -7
- package/dist/docs/reference/interfaces/StateContext.html +7 -5
- package/dist/docs/reference/interfaces/StateSyncable.html +11 -9
- package/dist/docs/reference/interfaces/modules/Control.html +19 -17
- package/dist/docs/reference/interfaces/modules/Grid.html +77 -55
- package/dist/docs/reference/interfaces/modules/Renderer.html +9 -7
- package/dist/docs/reference/interfaces/modules/RendererComposite.html +13 -11
- package/dist/docs/reference/interfaces/modules/Score.html +21 -19
- package/dist/docs/reference/interfaces/modules/Session.html +64 -18
- package/dist/docs/reference/interfaces/modules/State.html +59 -57
- package/dist/docs/reference/interfaces/modules/Text.html +21 -19
- package/dist/docs/reference/interfaces/modules/Time.html +80 -24
- package/dist/docs/reference/modules/Debugger.html +16 -14
- package/dist/docs/reference/modules/DisplayRenderer.html +10 -8
- package/dist/docs/reference/modules/EventEmitter.html +34 -26
- package/dist/docs/reference/modules/Game.html +55 -30
- package/dist/docs/reference/modules/GameControl.html +49 -44
- package/dist/docs/reference/modules/GameEventRegistry.html +17 -34
- package/dist/docs/reference/modules/GameGrid.html +174 -116
- package/dist/docs/reference/modules/GameHudGrid.html +10 -8
- package/dist/docs/reference/modules/GameRenderer.html +14 -12
- package/dist/docs/reference/modules/GameScore.html +36 -34
- package/dist/docs/reference/modules/GameSession.html +37 -19
- package/dist/docs/reference/modules/GameSound.html +20 -18
- package/dist/docs/reference/modules/GameState.html +70 -68
- package/dist/docs/reference/modules/GameText.html +29 -27
- package/dist/docs/reference/modules/GameTime.html +98 -30
- package/dist/docs/reference/modules/HudRenderer.html +10 -8
- package/dist/docs/reference/modules/InitialStateSnapshot.html +13 -11
- package/dist/docs/reference/modules/SessionModal.html +11 -9
- package/dist/docs/reference/types/Axis.html +7 -5
- package/dist/docs/reference/types/Cell.html +7 -5
- package/dist/docs/reference/types/ControlCallback.html +7 -5
- package/dist/docs/reference/types/Coordinate.html +7 -5
- package/dist/docs/reference/types/GameEvent.html +7 -5
- package/dist/docs/reference/types/Piece.html +7 -5
- package/dist/docs/reference/types/RendererMetrics.html +7 -5
- package/dist/docs/reference/types/Vector.html +7 -5
- package/dist/docs/reference/view/GameView.html +29 -21
- package/dist/docs/testing_best_practices.html +2 -2
- package/dist/game.bundle.js +1 -1
- package/dist/types/bootstrap.d.ts +12 -11
- package/dist/types/core/Game.d.ts +46 -39
- package/dist/types/core/InitialStateSnapshot.d.ts +18 -6
- package/dist/types/core/context/RendererContext.d.ts +32 -10
- package/dist/types/core/event/EventEmitter.d.ts +64 -21
- package/dist/types/core/event/GameEventRegistry.d.ts +17 -3
- package/dist/types/core/helpers/CellHelper.d.ts +11 -4
- package/dist/types/core/helpers/ControlInputHandlerHelper.d.ts +20 -11
- package/dist/types/core/helpers/CoordinateHelper.d.ts +28 -23
- package/dist/types/core/helpers/InterfaceIdentifierHelper.d.ts +34 -0
- package/dist/types/core/helpers/RelativeValuesHelper.d.ts +10 -8
- package/dist/types/core/module/control/GameControl.d.ts +26 -14
- package/dist/types/core/module/grid/GameGrid.d.ts +92 -53
- package/dist/types/core/module/grid/GameHudGrid.d.ts +9 -7
- package/dist/types/core/module/grid/engines/GridAnalysisEngine.d.ts +25 -6
- package/dist/types/core/module/grid/engines/GridLineEngine.d.ts +51 -13
- package/dist/types/core/module/grid/engines/GridMovementEngine.d.ts +97 -13
- package/dist/types/core/module/grid/engines/GridRegionEngine.d.ts +24 -5
- package/dist/types/core/module/grid/engines/GridTransformEngine.d.ts +21 -5
- package/dist/types/core/module/renderer/DisplayRenderer.d.ts +27 -15
- package/dist/types/core/module/renderer/GameRenderer.d.ts +20 -13
- package/dist/types/core/module/renderer/HudRenderer.d.ts +27 -19
- package/dist/types/core/module/score/GameScore.d.ts +29 -18
- package/dist/types/core/module/session/GameSession.d.ts +56 -0
- package/dist/types/core/module/sound/GameSound.d.ts +39 -23
- package/dist/types/core/module/state/GameState.d.ts +38 -14
- package/dist/types/core/module/text/GameText.d.ts +40 -25
- package/dist/types/core/module/time/GameTime.d.ts +52 -18
- package/dist/types/core/types/Interfaces.d.ts +15 -0
- package/dist/types/core/types/Types.d.ts +1 -0
- package/dist/types/core/types/enums.d.ts +2 -1
- package/dist/types/core/types/modules.d.ts +214 -45
- package/dist/types/view/Debugger.d.ts +23 -0
- package/dist/types/view/GameView.d.ts +44 -27
- package/dist/types/view/SessionModal.d.ts +24 -0
- package/package.json +1 -1
- package/dist/CNAME +0 -1
|
@@ -443,35 +443,41 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
443
443
|
<div id="toc" class="toc2">
|
|
444
444
|
<div id="toctitle">Table of Contents</div>
|
|
445
445
|
<ul class="sectlevel1">
|
|
446
|
-
<li><a href="#
|
|
446
|
+
<li><a href="#architectural-purpose">1. Architectural Purpose</a></li>
|
|
447
|
+
<li><a href="#api-reference">2. API Reference</a>
|
|
447
448
|
<ul class="sectlevel2">
|
|
448
|
-
<li><a href="#tickinterval-number">
|
|
449
|
-
<li><a href="#
|
|
450
|
-
<li><a href="#
|
|
451
|
-
<li><a href="#
|
|
452
|
-
<li><a href="#
|
|
453
|
-
<li><a href="#
|
|
454
|
-
<li><a href="#
|
|
455
|
-
<li><a href="#
|
|
456
|
-
<li><a href="#
|
|
449
|
+
<li><a href="#tickinterval-number">2.1. <code>tickInterval: number</code></a></li>
|
|
450
|
+
<li><a href="#totalticks-number">2.2. <code>totalTicks: number</code></a></li>
|
|
451
|
+
<li><a href="#elapsedtime-number">2.3. <code>elapsedTime: number</code></a></li>
|
|
452
|
+
<li><a href="#shouldtick-boolean">2.4. <code>shouldTick(): boolean</code></a></li>
|
|
453
|
+
<li><a href="#updatedeltatime-number-void">2.5. <code>update(deltaTime: number): void</code></a></li>
|
|
454
|
+
<li><a href="#reset-void">2.6. <code>reset(): void</code></a></li>
|
|
455
|
+
<li><a href="#istickeveryinterval-number-boolean">2.7. <code>isTickEvery(interval: number): boolean</code></a></li>
|
|
456
|
+
<li><a href="#incrementtickintervalamount-number-void">2.8. <code>incrementTickInterval(amount: number): void</code></a></li>
|
|
457
|
+
<li><a href="#decrementtickintervalamount-number-void">2.9. <code>decrementTickInterval(amount: number): void</code></a></li>
|
|
458
|
+
<li><a href="#settickintervalinterval-number-void">2.10. <code>setTickInterval(interval: number): void</code></a></li>
|
|
459
|
+
<li><a href="#setmintickintervalinterval-number-void">2.11. <code>setMinTickInterval(interval: number): void</code></a></li>
|
|
460
|
+
<li><a href="#getdebugdata-recordstring-string-number-boolean">2.12. <code>getDebugData(): Record<string, string | number | boolean></code></a></li>
|
|
461
|
+
<li><a href="#captureinitialstate-void">2.13. <code>captureInitialState(): void</code></a></li>
|
|
457
462
|
</ul>
|
|
458
463
|
</li>
|
|
459
464
|
</ul>
|
|
460
465
|
</div>
|
|
461
466
|
</div>
|
|
462
467
|
<div id="content">
|
|
463
|
-
<div
|
|
468
|
+
<div class="sect1">
|
|
469
|
+
<h2 id="architectural-purpose"><a class="link" href="#architectural-purpose">1. Architectural Purpose</a></h2>
|
|
464
470
|
<div class="sectionbody">
|
|
465
471
|
<div class="paragraph">
|
|
466
|
-
<p>The <code>GameTime</code> module manages the engine’s logical clock.
|
|
472
|
+
<p>The <code>GameTime</code> module manages the engine’s logical clock independent of the visual context. By decoupling the deterministic game logic "ticks" from the unpredictable visual frame rate of the browser, it ensures consistent gameplay speed and difficulty-progression physics regardless of the device’s hardware performance capabilities.</p>
|
|
467
473
|
</div>
|
|
468
474
|
</div>
|
|
469
475
|
</div>
|
|
470
476
|
<div class="sect1">
|
|
471
|
-
<h2 id="api-reference"><a class="link" href="#api-reference">
|
|
477
|
+
<h2 id="api-reference"><a class="link" href="#api-reference">2. API Reference</a></h2>
|
|
472
478
|
<div class="sectionbody">
|
|
473
479
|
<div class="sect2">
|
|
474
|
-
<h3 id="tickinterval-number"><a class="link" href="#tickinterval-number">
|
|
480
|
+
<h3 id="tickinterval-number"><a class="link" href="#tickinterval-number">2.1. <code>tickInterval: number</code></a></h3>
|
|
475
481
|
<div class="paragraph">
|
|
476
482
|
<p>Getter/Setter for the game logic speed in milliseconds.</p>
|
|
477
483
|
</div>
|
|
@@ -490,7 +496,21 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
490
496
|
<hr>
|
|
491
497
|
</div>
|
|
492
498
|
<div class="sect2">
|
|
493
|
-
<h3 id="
|
|
499
|
+
<h3 id="totalticks-number"><a class="link" href="#totalticks-number">2.2. <code>totalTicks: number</code></a></h3>
|
|
500
|
+
<div class="paragraph">
|
|
501
|
+
<p>Read-only property returning the total number of logic ticks that have occurred since the game started.</p>
|
|
502
|
+
</div>
|
|
503
|
+
<hr>
|
|
504
|
+
</div>
|
|
505
|
+
<div class="sect2">
|
|
506
|
+
<h3 id="elapsedtime-number"><a class="link" href="#elapsedtime-number">2.3. <code>elapsedTime: number</code></a></h3>
|
|
507
|
+
<div class="paragraph">
|
|
508
|
+
<p>Read-only property returning the total time in milliseconds elapsed since the game started.</p>
|
|
509
|
+
</div>
|
|
510
|
+
<hr>
|
|
511
|
+
</div>
|
|
512
|
+
<div class="sect2">
|
|
513
|
+
<h3 id="shouldtick-boolean"><a class="link" href="#shouldtick-boolean">2.4. <code>shouldTick(): boolean</code></a></h3>
|
|
494
514
|
<div class="paragraph">
|
|
495
515
|
<p>Determines if a logic update should be executed.</p>
|
|
496
516
|
</div>
|
|
@@ -498,20 +518,20 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
498
518
|
<p><strong>Returns</strong></p>
|
|
499
519
|
</div>
|
|
500
520
|
<div class="paragraph">
|
|
501
|
-
<p><code>boolean</code> - <code>true</code> if the internal accumulator has exceeded the <code>tickInterval</code>.</p>
|
|
521
|
+
<p><code>boolean</code> - <code>true</code> if the internal ticker buffer (accumulator) has exceeded the <code>tickInterval</code>.</p>
|
|
502
522
|
</div>
|
|
503
523
|
<div class="paragraph">
|
|
504
524
|
<p><strong>Behavior</strong></p>
|
|
505
525
|
</div>
|
|
506
526
|
<div class="paragraph">
|
|
507
|
-
<p>Called by the main loop. If it returns true, it automatically subtracts the <code>tickInterval</code> from the
|
|
527
|
+
<p>Called by the main loop. If it returns true, it automatically subtracts the <code>tickInterval</code> from the <code>tickAccumulator</code> to maintain a stable clock.</p>
|
|
508
528
|
</div>
|
|
509
529
|
<hr>
|
|
510
530
|
</div>
|
|
511
531
|
<div class="sect2">
|
|
512
|
-
<h3 id="updatedeltatime-number-void"><a class="link" href="#updatedeltatime-number-void">
|
|
532
|
+
<h3 id="updatedeltatime-number-void"><a class="link" href="#updatedeltatime-number-void">2.5. <code>update(deltaTime: number): void</code></a></h3>
|
|
513
533
|
<div class="paragraph">
|
|
514
|
-
<p>Advances the internal time accumulator.</p>
|
|
534
|
+
<p>Advances the internal time buffer (tick accumulator).</p>
|
|
515
535
|
</div>
|
|
516
536
|
<div class="paragraph">
|
|
517
537
|
<p><strong>Parameters</strong></p>
|
|
@@ -531,16 +551,16 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
531
551
|
<tr>
|
|
532
552
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>deltaTime</code></p></td>
|
|
533
553
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>number</code></p></td>
|
|
534
|
-
<td class="tableblock halign-left valign-top"><p class="tableblock">Time elapsed since the last
|
|
554
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Time physically elapsed since the last rendering frame (in milliseconds).</p></td>
|
|
535
555
|
</tr>
|
|
536
556
|
</tbody>
|
|
537
557
|
</table>
|
|
538
558
|
<hr>
|
|
539
559
|
</div>
|
|
540
560
|
<div class="sect2">
|
|
541
|
-
<h3 id="reset-void"><a class="link" href="#reset-void">
|
|
561
|
+
<h3 id="reset-void"><a class="link" href="#reset-void">2.6. <code>reset(): void</code></a></h3>
|
|
542
562
|
<div class="paragraph">
|
|
543
|
-
<p>Clears the
|
|
563
|
+
<p>Clears the tick accumulator.</p>
|
|
544
564
|
</div>
|
|
545
565
|
<div class="paragraph">
|
|
546
566
|
<p><strong>Behavior</strong></p>
|
|
@@ -551,7 +571,42 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
551
571
|
<hr>
|
|
552
572
|
</div>
|
|
553
573
|
<div class="sect2">
|
|
554
|
-
<h3 id="
|
|
574
|
+
<h3 id="istickeveryinterval-number-boolean"><a class="link" href="#istickeveryinterval-number-boolean">2.7. <code>isTickEvery(interval: number): boolean</code></a></h3>
|
|
575
|
+
<div class="paragraph">
|
|
576
|
+
<p>Returns <code>true</code> if the <code>totalTicks</code> is a multiple of the specified <code>interval</code>. Useful for scheduling recurring game events (e.g., spawning an item every 20 ticks).</p>
|
|
577
|
+
</div>
|
|
578
|
+
<div class="paragraph">
|
|
579
|
+
<p><strong>Parameters</strong></p>
|
|
580
|
+
</div>
|
|
581
|
+
<table class="tableblock frame-all grid-all stretch">
|
|
582
|
+
<colgroup>
|
|
583
|
+
<col style="width: 20%;">
|
|
584
|
+
<col style="width: 20%;">
|
|
585
|
+
<col style="width: 60%;">
|
|
586
|
+
</colgroup>
|
|
587
|
+
<tbody>
|
|
588
|
+
<tr>
|
|
589
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Name</p></td>
|
|
590
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Type</p></td>
|
|
591
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">Description</p></td>
|
|
592
|
+
</tr>
|
|
593
|
+
<tr>
|
|
594
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>interval</code></p></td>
|
|
595
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>number</code></p></td>
|
|
596
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">The tick frequency interval constraint to check against.</p></td>
|
|
597
|
+
</tr>
|
|
598
|
+
</tbody>
|
|
599
|
+
</table>
|
|
600
|
+
<div class="paragraph">
|
|
601
|
+
<p><strong>Returns</strong></p>
|
|
602
|
+
</div>
|
|
603
|
+
<div class="paragraph">
|
|
604
|
+
<p><code>boolean</code> - <code>true</code> if the current tick is a multiple of the interval (and greater than 0).</p>
|
|
605
|
+
</div>
|
|
606
|
+
<hr>
|
|
607
|
+
</div>
|
|
608
|
+
<div class="sect2">
|
|
609
|
+
<h3 id="incrementtickintervalamount-number-void"><a class="link" href="#incrementtickintervalamount-number-void">2.8. <code>incrementTickInterval(amount: number): void</code></a></h3>
|
|
555
610
|
<div class="paragraph">
|
|
556
611
|
<p>Slows down the game by increasing the time between ticks.</p>
|
|
557
612
|
</div>
|
|
@@ -580,7 +635,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
580
635
|
<hr>
|
|
581
636
|
</div>
|
|
582
637
|
<div class="sect2">
|
|
583
|
-
<h3 id="decrementtickintervalamount-number-void"><a class="link" href="#decrementtickintervalamount-number-void">
|
|
638
|
+
<h3 id="decrementtickintervalamount-number-void"><a class="link" href="#decrementtickintervalamount-number-void">2.9. <code>decrementTickInterval(amount: number): void</code></a></h3>
|
|
584
639
|
<div class="paragraph">
|
|
585
640
|
<p>Speeds up the game by decreasing the time between ticks.</p>
|
|
586
641
|
</div>
|
|
@@ -609,7 +664,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
609
664
|
<hr>
|
|
610
665
|
</div>
|
|
611
666
|
<div class="sect2">
|
|
612
|
-
<h3 id="settickintervalinterval-number-void"><a class="link" href="#settickintervalinterval-number-void">
|
|
667
|
+
<h3 id="settickintervalinterval-number-void"><a class="link" href="#settickintervalinterval-number-void">2.10. <code>setTickInterval(interval: number): void</code></a></h3>
|
|
613
668
|
<div class="paragraph">
|
|
614
669
|
<p>Sets the tick interval exactly to the specified value.</p>
|
|
615
670
|
</div>
|
|
@@ -631,14 +686,14 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
631
686
|
<tr>
|
|
632
687
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>interval</code></p></td>
|
|
633
688
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>number</code></p></td>
|
|
634
|
-
<td class="tableblock halign-left valign-top"><p class="tableblock">The new interval between logic updates (in milliseconds).</p></td>
|
|
689
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">The precise new integer interval interval between logic updates (in milliseconds).</p></td>
|
|
635
690
|
</tr>
|
|
636
691
|
</tbody>
|
|
637
692
|
</table>
|
|
638
693
|
<hr>
|
|
639
694
|
</div>
|
|
640
695
|
<div class="sect2">
|
|
641
|
-
<h3 id="setmintickintervalinterval-number-void"><a class="link" href="#setmintickintervalinterval-number-void">
|
|
696
|
+
<h3 id="setmintickintervalinterval-number-void"><a class="link" href="#setmintickintervalinterval-number-void">2.11. <code>setMinTickInterval(interval: number): void</code></a></h3>
|
|
642
697
|
<div class="paragraph">
|
|
643
698
|
<p>Sets the minimum limit for the tick interval, preventing the game from speeding up beyond this point.</p>
|
|
644
699
|
</div>
|
|
@@ -660,14 +715,14 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
660
715
|
<tr>
|
|
661
716
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>interval</code></p></td>
|
|
662
717
|
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>number</code></p></td>
|
|
663
|
-
<td class="tableblock halign-left valign-top"><p class="tableblock">The minimum interval allowed (in milliseconds).</p></td>
|
|
718
|
+
<td class="tableblock halign-left valign-top"><p class="tableblock">The strict minimum boundary interval allowed (in milliseconds).</p></td>
|
|
664
719
|
</tr>
|
|
665
720
|
</tbody>
|
|
666
721
|
</table>
|
|
667
722
|
<hr>
|
|
668
723
|
</div>
|
|
669
724
|
<div class="sect2">
|
|
670
|
-
<h3 id="getdebugdata-recordstring-string-number-boolean"><a class="link" href="#getdebugdata-recordstring-string-number-boolean">
|
|
725
|
+
<h3 id="getdebugdata-recordstring-string-number-boolean"><a class="link" href="#getdebugdata-recordstring-string-number-boolean">2.12. <code>getDebugData(): Record<string, string | number | boolean></code></a></h3>
|
|
671
726
|
<div class="paragraph">
|
|
672
727
|
<p>Returns metadata for the real-time debugger.</p>
|
|
673
728
|
</div>
|
|
@@ -675,7 +730,20 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
675
730
|
<p><strong>Returns</strong></p>
|
|
676
731
|
</div>
|
|
677
732
|
<div class="paragraph">
|
|
678
|
-
<p><code>Record<string, string | number | boolean></code> - Object containing <code>fps</code> (Frames Per Second)
|
|
733
|
+
<p><code>Record<string, string | number | boolean></code> - Object containing <code>fps</code> (Frames Per Second), <code>tps</code> (Ticks Per Second), <code>tick_interval</code>, and <code>tick_accumulator</code>.</p>
|
|
734
|
+
</div>
|
|
735
|
+
<hr>
|
|
736
|
+
</div>
|
|
737
|
+
<div class="sect2">
|
|
738
|
+
<h3 id="captureinitialstate-void"><a class="link" href="#captureinitialstate-void">2.13. <code>captureInitialState(): void</code></a></h3>
|
|
739
|
+
<div class="paragraph">
|
|
740
|
+
<p>Captures the current <code>tickInterval</code> as the starting speed for the game session.</p>
|
|
741
|
+
</div>
|
|
742
|
+
<div class="paragraph">
|
|
743
|
+
<p><strong>Behavior</strong></p>
|
|
744
|
+
</div>
|
|
745
|
+
<div class="paragraph">
|
|
746
|
+
<p>This method is called by the <code>Game</code> engine after the game-specific <code>setupGame()</code> has executed. It ensures that when <code>reset()</code> is called, the game returns to its intended initial speed rather than the engine’s global default.</p>
|
|
679
747
|
</div>
|
|
680
748
|
</div>
|
|
681
749
|
</div>
|
|
@@ -443,28 +443,30 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
443
443
|
<div id="toc" class="toc2">
|
|
444
444
|
<div id="toctitle">Table of Contents</div>
|
|
445
445
|
<ul class="sectlevel1">
|
|
446
|
-
<li><a href="#
|
|
446
|
+
<li><a href="#architectural-purpose">1. Architectural Purpose</a></li>
|
|
447
|
+
<li><a href="#api-reference">2. API Reference</a>
|
|
447
448
|
<ul class="sectlevel2">
|
|
448
|
-
<li><a href="#setuprenderermetrics-renderermetrics-void">
|
|
449
|
-
<li><a href="#rendergrid-cell-modules-gamemodules-void">
|
|
449
|
+
<li><a href="#setuprenderermetrics-renderermetrics-void">2.1. <code>setup(rendererMetrics: RendererMetrics): void</code></a></li>
|
|
450
|
+
<li><a href="#rendergrid-cell-modules-gamemodules-void">2.2. <code>render(grid: Cell[][], modules: GameModules): void</code></a></li>
|
|
450
451
|
</ul>
|
|
451
452
|
</li>
|
|
452
453
|
</ul>
|
|
453
454
|
</div>
|
|
454
455
|
</div>
|
|
455
456
|
<div id="content">
|
|
456
|
-
<div
|
|
457
|
+
<div class="sect1">
|
|
458
|
+
<h2 id="architectural-purpose"><a class="link" href="#architectural-purpose">1. Architectural Purpose</a></h2>
|
|
457
459
|
<div class="sectionbody">
|
|
458
460
|
<div class="paragraph">
|
|
459
|
-
<p>The <code>HudRenderer</code> manages the visualization
|
|
461
|
+
<p>The <code>HudRenderer</code> manages the strict visualization sequence outlining string payloads and UI components, including scores, levels, system status, and the specialized piece view. It deliberately abstracts these data polling operations away from the physics grid logic so that game execution speeds aren’t restricted by formatting strings or parsing metadata visual offsets.</p>
|
|
460
462
|
</div>
|
|
461
463
|
</div>
|
|
462
464
|
</div>
|
|
463
465
|
<div class="sect1">
|
|
464
|
-
<h2 id="api-reference"><a class="link" href="#api-reference">
|
|
466
|
+
<h2 id="api-reference"><a class="link" href="#api-reference">2. API Reference</a></h2>
|
|
465
467
|
<div class="sectionbody">
|
|
466
468
|
<div class="sect2">
|
|
467
|
-
<h3 id="setuprenderermetrics-renderermetrics-void"><a class="link" href="#setuprenderermetrics-renderermetrics-void">
|
|
469
|
+
<h3 id="setuprenderermetrics-renderermetrics-void"><a class="link" href="#setuprenderermetrics-renderermetrics-void">2.1. <code>setup(rendererMetrics: RendererMetrics): void</code></a></h3>
|
|
468
470
|
<div class="paragraph">
|
|
469
471
|
<p>Pre-calculates static HUD geometry.</p>
|
|
470
472
|
</div>
|
|
@@ -499,7 +501,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
499
501
|
<hr>
|
|
500
502
|
</div>
|
|
501
503
|
<div class="sect2">
|
|
502
|
-
<h3 id="rendergrid-cell-modules-gamemodules-void"><a class="link" href="#rendergrid-cell-modules-gamemodules-void">
|
|
504
|
+
<h3 id="rendergrid-cell-modules-gamemodules-void"><a class="link" href="#rendergrid-cell-modules-gamemodules-void">2.2. <code>render(grid: Cell[][], modules: GameModules): void</code></a></h3>
|
|
503
505
|
<div class="paragraph">
|
|
504
506
|
<p>Main HUD drawing orchestration.</p>
|
|
505
507
|
</div>
|
|
@@ -441,29 +441,31 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
441
441
|
<div id="toc" class="toc2">
|
|
442
442
|
<div id="toctitle">Table of Contents</div>
|
|
443
443
|
<ul class="sectlevel1">
|
|
444
|
-
<li><a href="#
|
|
444
|
+
<li><a href="#architectural-purpose">1. Architectural Purpose</a></li>
|
|
445
|
+
<li><a href="#methods">2. Methods</a>
|
|
445
446
|
<ul class="sectlevel2">
|
|
446
|
-
<li><a href="#capturebaseproperties">
|
|
447
|
-
<li><a href="#captureinitialstate">
|
|
448
|
-
<li><a href="#restoreinitialstate">
|
|
447
|
+
<li><a href="#capturebaseproperties">2.1. <code>captureBaseProperties</code></a></li>
|
|
448
|
+
<li><a href="#captureinitialstate">2.2. <code>captureInitialState</code></a></li>
|
|
449
|
+
<li><a href="#restoreinitialstate">2.3. <code>restoreInitialState</code></a></li>
|
|
449
450
|
</ul>
|
|
450
451
|
</li>
|
|
451
452
|
</ul>
|
|
452
453
|
</div>
|
|
453
454
|
</div>
|
|
454
455
|
<div id="content">
|
|
455
|
-
<div
|
|
456
|
+
<div class="sect1">
|
|
457
|
+
<h2 id="architectural-purpose"><a class="link" href="#architectural-purpose">1. Architectural Purpose</a></h2>
|
|
456
458
|
<div class="sectionbody">
|
|
457
459
|
<div class="paragraph">
|
|
458
|
-
<p>The <code>InitialStateSnapshot</code>
|
|
460
|
+
<p>The <code>InitialStateSnapshot</code> acts as an agnostic structural utility handling transparent auto-save boundaries. Rather than forcing developers to write boilerplate serialization functions for their native sub-classes, the Engine relies on this module to dynamically iterate, deeply clone, and selectively safely cache customized attributes into local memory buffers to restore configurations effortlessly upon reset triggers.</p>
|
|
459
461
|
</div>
|
|
460
462
|
</div>
|
|
461
463
|
</div>
|
|
462
464
|
<div class="sect1">
|
|
463
|
-
<h2 id="methods"><a class="link" href="#methods">
|
|
465
|
+
<h2 id="methods"><a class="link" href="#methods">2. Methods</a></h2>
|
|
464
466
|
<div class="sectionbody">
|
|
465
467
|
<div class="sect2">
|
|
466
|
-
<h3 id="capturebaseproperties"><a class="link" href="#capturebaseproperties">
|
|
468
|
+
<h3 id="capturebaseproperties"><a class="link" href="#capturebaseproperties">2.1. <code>captureBaseProperties</code></a></h3>
|
|
467
469
|
<div class="paragraph">
|
|
468
470
|
<p>Captures the base properties of the instance before any custom client properties are added. In the engine’s architecture, this should be called at the very end of the base <code>Game</code> constructor, establishing the baseline for what should be ignored during the snapshot phase automatically.</p>
|
|
469
471
|
</div>
|
|
@@ -491,7 +493,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
491
493
|
<hr>
|
|
492
494
|
</div>
|
|
493
495
|
<div class="sect2">
|
|
494
|
-
<h3 id="captureinitialstate"><a class="link" href="#captureinitialstate">
|
|
496
|
+
<h3 id="captureinitialstate"><a class="link" href="#captureinitialstate">2.2. <code>captureInitialState</code></a></h3>
|
|
495
497
|
<div class="paragraph">
|
|
496
498
|
<p>Stores the initial state of custom client properties. It selectively clones properties that were not present in the base properties and are not functions. The deep cloning strategy involves:
|
|
497
499
|
1. Checking if the object has a custom <code>clone()</code> method.
|
|
@@ -522,7 +524,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
522
524
|
<hr>
|
|
523
525
|
</div>
|
|
524
526
|
<div class="sect2">
|
|
525
|
-
<h3 id="restoreinitialstate"><a class="link" href="#restoreinitialstate">
|
|
527
|
+
<h3 id="restoreinitialstate"><a class="link" href="#restoreinitialstate">2.3. <code>restoreInitialState</code></a></h3>
|
|
526
528
|
<div class="paragraph">
|
|
527
529
|
<p>Restores the captured custom properties back to the instance, effectively resetting the client’s state.</p>
|
|
528
530
|
</div>
|
|
@@ -553,7 +555,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
553
555
|
</div>
|
|
554
556
|
<div id="footer">
|
|
555
557
|
<div id="footer-text">
|
|
556
|
-
Last updated 2026-02-
|
|
558
|
+
Last updated 2026-02-27 22:00:35 -0300
|
|
557
559
|
</div>
|
|
558
560
|
</div>
|
|
559
561
|
</body>
|
|
@@ -442,35 +442,37 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
442
442
|
<div id="toc" class="toc2">
|
|
443
443
|
<div id="toctitle">Table of Contents</div>
|
|
444
444
|
<ul class="sectlevel1">
|
|
445
|
-
<li><a href="#
|
|
445
|
+
<li><a href="#_architectural_purpose">1. Architectural Purpose</a></li>
|
|
446
|
+
<li><a href="#_lifecycle">2. Lifecycle</a>
|
|
446
447
|
<ul class="sectlevel2">
|
|
447
|
-
<li><a href="#_setup_void">
|
|
448
|
-
<li><a href="#_showonconfirm_void_oncancel_void_void">
|
|
448
|
+
<li><a href="#_setup_void">2.1. <code>setup(): void</code></a></li>
|
|
449
|
+
<li><a href="#_showonconfirm_void_oncancel_void_void">2.2. <code>show(onConfirm: () ⇒ void, onCancel: () ⇒ void): void</code></a></li>
|
|
449
450
|
</ul>
|
|
450
451
|
</li>
|
|
451
452
|
</ul>
|
|
452
453
|
</div>
|
|
453
454
|
</div>
|
|
454
455
|
<div id="content">
|
|
455
|
-
<div
|
|
456
|
+
<div class="sect1">
|
|
457
|
+
<h2 id="_architectural_purpose"><a class="link" href="#_architectural_purpose">1. Architectural Purpose</a></h2>
|
|
456
458
|
<div class="sectionbody">
|
|
457
459
|
<div class="paragraph">
|
|
458
|
-
<p>The <code>SessionModal</code>
|
|
460
|
+
<p>The <code>SessionModal</code> generates an explicit blocking UI boundary forcing the User to interpret corrupted or previously interrupted memory states safely. Designed as a standalone Vanilla DOM layer hovering entirely above the game Engine canvas, it acts as a synchronized <code>Promise</code> wall. The background engine pauses initial boot sequences until physical button listeners explicitly return 'Confirm' or 'Cancel', thus preventing corrupt states from overriding standard initialization.</p>
|
|
459
461
|
</div>
|
|
460
462
|
</div>
|
|
461
463
|
</div>
|
|
462
464
|
<div class="sect1">
|
|
463
|
-
<h2 id="_lifecycle"><a class="link" href="#_lifecycle">
|
|
465
|
+
<h2 id="_lifecycle"><a class="link" href="#_lifecycle">2. Lifecycle</a></h2>
|
|
464
466
|
<div class="sectionbody">
|
|
465
467
|
<div class="sect2">
|
|
466
|
-
<h3 id="_setup_void"><a class="link" href="#_setup_void">
|
|
468
|
+
<h3 id="_setup_void"><a class="link" href="#_setup_void">2.1. <code>setup(): void</code></a></h3>
|
|
467
469
|
<div class="paragraph">
|
|
468
470
|
<p>Creates the necessary DOM layer elements. Called typically during engine bootstrap by the <code><a href="../../view/GameView.html">GameView</a></code>.
|
|
469
471
|
Constructs the background container wrapper, title frames, dialogue text, and confirm/cancel action buttons. Sets their initial state utilizing the CSS <code>.hidden</code> class to keep them out of view until queried.</p>
|
|
470
472
|
</div>
|
|
471
473
|
</div>
|
|
472
474
|
<div class="sect2">
|
|
473
|
-
<h3 id="_showonconfirm_void_oncancel_void_void"><a class="link" href="#_showonconfirm_void_oncancel_void_void">
|
|
475
|
+
<h3 id="_showonconfirm_void_oncancel_void_void"><a class="link" href="#_showonconfirm_void_oncancel_void_void">2.2. <code>show(onConfirm: () ⇒ void, onCancel: () ⇒ void): void</code></a></h3>
|
|
474
476
|
<div class="paragraph">
|
|
475
477
|
<p>Reveals the modal.</p>
|
|
476
478
|
</div>
|
|
@@ -513,7 +515,7 @@ Constructs the background container wrapper, title frames, dialogue text, and co
|
|
|
513
515
|
</div>
|
|
514
516
|
<div id="footer">
|
|
515
517
|
<div id="footer-text">
|
|
516
|
-
Last updated 2026-02-
|
|
518
|
+
Last updated 2026-02-27 21:56:50 -0300
|
|
517
519
|
</div>
|
|
518
520
|
</div>
|
|
519
521
|
</body>
|
|
@@ -443,13 +443,15 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
443
443
|
<div id="toc" class="toc2">
|
|
444
444
|
<div id="toctitle">Table of Contents</div>
|
|
445
445
|
<ul class="sectlevel1">
|
|
446
|
-
<li><a href="#
|
|
447
|
-
<li><a href="#
|
|
446
|
+
<li><a href="#architectural-purpose">1. Architectural Purpose</a></li>
|
|
447
|
+
<li><a href="#possible-values">2. Possible Values</a></li>
|
|
448
|
+
<li><a href="#general-usage">3. General Usage</a></li>
|
|
448
449
|
</ul>
|
|
449
450
|
</div>
|
|
450
451
|
</div>
|
|
451
452
|
<div id="content">
|
|
452
|
-
<div
|
|
453
|
+
<div class="sect1">
|
|
454
|
+
<h2 id="architectural-purpose"><a class="link" href="#architectural-purpose">1. Architectural Purpose</a></h2>
|
|
453
455
|
<div class="sectionbody">
|
|
454
456
|
<div class="paragraph">
|
|
455
457
|
<p>Represents an axis in a 2D coordinate system.</p>
|
|
@@ -457,7 +459,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
457
459
|
</div>
|
|
458
460
|
</div>
|
|
459
461
|
<div class="sect1">
|
|
460
|
-
<h2 id="possible-values"><a class="link" href="#possible-values">
|
|
462
|
+
<h2 id="possible-values"><a class="link" href="#possible-values">2. Possible Values</a></h2>
|
|
461
463
|
<div class="sectionbody">
|
|
462
464
|
<table class="tableblock frame-all grid-all stretch">
|
|
463
465
|
<colgroup>
|
|
@@ -482,7 +484,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
482
484
|
</div>
|
|
483
485
|
</div>
|
|
484
486
|
<div class="sect1">
|
|
485
|
-
<h2 id="general-usage"><a class="link" href="#general-usage">
|
|
487
|
+
<h2 id="general-usage"><a class="link" href="#general-usage">3. General Usage</a></h2>
|
|
486
488
|
<div class="sectionbody">
|
|
487
489
|
<div class="paragraph">
|
|
488
490
|
<p>The <code>Axis</code> type is primarily used for transformation operations that apply selectively to one dimension, such as mirroring a piece across a specific axis.</p>
|
|
@@ -443,13 +443,15 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
443
443
|
<div id="toc" class="toc2">
|
|
444
444
|
<div id="toctitle">Table of Contents</div>
|
|
445
445
|
<ul class="sectlevel1">
|
|
446
|
-
<li><a href="#
|
|
447
|
-
<li><a href="#
|
|
446
|
+
<li><a href="#architectural-purpose">1. Architectural Purpose</a></li>
|
|
447
|
+
<li><a href="#attributes">2. Attributes</a></li>
|
|
448
|
+
<li><a href="#general-usage">3. General Usage</a></li>
|
|
448
449
|
</ul>
|
|
449
450
|
</div>
|
|
450
451
|
</div>
|
|
451
452
|
<div id="content">
|
|
452
|
-
<div
|
|
453
|
+
<div class="sect1">
|
|
454
|
+
<h2 id="architectural-purpose"><a class="link" href="#architectural-purpose">1. Architectural Purpose</a></h2>
|
|
453
455
|
<div class="sectionbody">
|
|
454
456
|
<div class="paragraph">
|
|
455
457
|
<p>Represents the state of an individual unit within the 2D game grid.</p>
|
|
@@ -457,7 +459,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
457
459
|
</div>
|
|
458
460
|
</div>
|
|
459
461
|
<div class="sect1">
|
|
460
|
-
<h2 id="attributes"><a class="link" href="#attributes">
|
|
462
|
+
<h2 id="attributes"><a class="link" href="#attributes">2. Attributes</a></h2>
|
|
461
463
|
<div class="sectionbody">
|
|
462
464
|
<table class="tableblock frame-all grid-all stretch">
|
|
463
465
|
<colgroup>
|
|
@@ -491,7 +493,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
491
493
|
</div>
|
|
492
494
|
</div>
|
|
493
495
|
<div class="sect1">
|
|
494
|
-
<h2 id="general-usage"><a class="link" href="#general-usage">
|
|
496
|
+
<h2 id="general-usage"><a class="link" href="#general-usage">3. General Usage</a></h2>
|
|
495
497
|
<div class="sectionbody">
|
|
496
498
|
<div class="paragraph">
|
|
497
499
|
<p>Cells are managed by the <code><a href="../modules/GameGrid.html">GameGrid</a></code> module. They are rarely created manually; instead, they are accessed and modified via methods like <code>grid.getCell(coord)</code> and <code>grid.setCellValue(coord, val)</code>.</p>
|
|
@@ -443,13 +443,15 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
443
443
|
<div id="toc" class="toc2">
|
|
444
444
|
<div id="toctitle">Table of Contents</div>
|
|
445
445
|
<ul class="sectlevel1">
|
|
446
|
-
<li><a href="#
|
|
447
|
-
<li><a href="#
|
|
446
|
+
<li><a href="#architectural-purpose">1. Architectural Purpose</a></li>
|
|
447
|
+
<li><a href="#structure">2. Structure</a></li>
|
|
448
|
+
<li><a href="#general-usage">3. General Usage</a></li>
|
|
448
449
|
</ul>
|
|
449
450
|
</div>
|
|
450
451
|
</div>
|
|
451
452
|
<div id="content">
|
|
452
|
-
<div
|
|
453
|
+
<div class="sect1">
|
|
454
|
+
<h2 id="architectural-purpose"><a class="link" href="#architectural-purpose">1. Architectural Purpose</a></h2>
|
|
453
455
|
<div class="sectionbody">
|
|
454
456
|
<div class="paragraph">
|
|
455
457
|
<p>Type definition for functions that handle engine input.</p>
|
|
@@ -457,7 +459,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
457
459
|
</div>
|
|
458
460
|
</div>
|
|
459
461
|
<div class="sect1">
|
|
460
|
-
<h2 id="structure"><a class="link" href="#structure">
|
|
462
|
+
<h2 id="structure"><a class="link" href="#structure">2. Structure</a></h2>
|
|
461
463
|
<div class="sectionbody">
|
|
462
464
|
<div class="paragraph">
|
|
463
465
|
<p><code>type ControlCallback = (event: <a href="GameEvent.html">GameEvent</a>) ⇒ void;</code></p>
|
|
@@ -465,7 +467,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
465
467
|
</div>
|
|
466
468
|
</div>
|
|
467
469
|
<div class="sect1">
|
|
468
|
-
<h2 id="general-usage"><a class="link" href="#general-usage">
|
|
470
|
+
<h2 id="general-usage"><a class="link" href="#general-usage">3. General Usage</a></h2>
|
|
469
471
|
<div class="sectionbody">
|
|
470
472
|
<div class="paragraph">
|
|
471
473
|
<p>This type ensures that functions passed to <code>modules.control.subscribe(key, type, callback)</code> (see <code><a href="../modules/GameControl.html">GameControl</a></code>) correctly accept the <code><a href="GameEvent.html">GameEvent</a></code> context.</p>
|
|
@@ -443,13 +443,15 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
443
443
|
<div id="toc" class="toc2">
|
|
444
444
|
<div id="toctitle">Table of Contents</div>
|
|
445
445
|
<ul class="sectlevel1">
|
|
446
|
-
<li><a href="#
|
|
447
|
-
<li><a href="#
|
|
446
|
+
<li><a href="#architectural-purpose">1. Architectural Purpose</a></li>
|
|
447
|
+
<li><a href="#attributes">2. Attributes</a></li>
|
|
448
|
+
<li><a href="#general-usage">3. General Usage</a></li>
|
|
448
449
|
</ul>
|
|
449
450
|
</div>
|
|
450
451
|
</div>
|
|
451
452
|
<div id="content">
|
|
452
|
-
<div
|
|
453
|
+
<div class="sect1">
|
|
454
|
+
<h2 id="architectural-purpose"><a class="link" href="#architectural-purpose">1. Architectural Purpose</a></h2>
|
|
453
455
|
<div class="sectionbody">
|
|
454
456
|
<div class="paragraph">
|
|
455
457
|
<p>A foundational 2D point interface used for positioning.</p>
|
|
@@ -457,7 +459,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
457
459
|
</div>
|
|
458
460
|
</div>
|
|
459
461
|
<div class="sect1">
|
|
460
|
-
<h2 id="attributes"><a class="link" href="#attributes">
|
|
462
|
+
<h2 id="attributes"><a class="link" href="#attributes">2. Attributes</a></h2>
|
|
461
463
|
<div class="sectionbody">
|
|
462
464
|
<table class="tableblock frame-all grid-all stretch">
|
|
463
465
|
<colgroup>
|
|
@@ -486,7 +488,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
486
488
|
</div>
|
|
487
489
|
</div>
|
|
488
490
|
<div class="sect1">
|
|
489
|
-
<h2 id="general-usage"><a class="link" href="#general-usage">
|
|
491
|
+
<h2 id="general-usage"><a class="link" href="#general-usage">3. General Usage</a></h2>
|
|
490
492
|
<div class="sectionbody">
|
|
491
493
|
<div class="paragraph">
|
|
492
494
|
<p>Coordinates describe grid positions (columns/rows) as integers, or normalized screen positions as floats (0.0 to 1.0).
|
|
@@ -443,13 +443,15 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
443
443
|
<div id="toc" class="toc2">
|
|
444
444
|
<div id="toctitle">Table of Contents</div>
|
|
445
445
|
<ul class="sectlevel1">
|
|
446
|
-
<li><a href="#
|
|
447
|
-
<li><a href="#
|
|
446
|
+
<li><a href="#architectural-purpose">1. Architectural Purpose</a></li>
|
|
447
|
+
<li><a href="#attributes">2. Attributes</a></li>
|
|
448
|
+
<li><a href="#general-usage">3. General Usage</a></li>
|
|
448
449
|
</ul>
|
|
449
450
|
</div>
|
|
450
451
|
</div>
|
|
451
452
|
<div id="content">
|
|
452
|
-
<div
|
|
453
|
+
<div class="sect1">
|
|
454
|
+
<h2 id="architectural-purpose"><a class="link" href="#architectural-purpose">1. Architectural Purpose</a></h2>
|
|
453
455
|
<div class="sectionbody">
|
|
454
456
|
<div class="paragraph">
|
|
455
457
|
<p>The context object delivered to input subscribers.</p>
|
|
@@ -457,7 +459,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
457
459
|
</div>
|
|
458
460
|
</div>
|
|
459
461
|
<div class="sect1">
|
|
460
|
-
<h2 id="attributes"><a class="link" href="#attributes">
|
|
462
|
+
<h2 id="attributes"><a class="link" href="#attributes">2. Attributes</a></h2>
|
|
461
463
|
<div class="sectionbody">
|
|
462
464
|
<table class="tableblock frame-all grid-all stretch">
|
|
463
465
|
<colgroup>
|
|
@@ -491,7 +493,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
|
|
|
491
493
|
</div>
|
|
492
494
|
</div>
|
|
493
495
|
<div class="sect1">
|
|
494
|
-
<h2 id="general-usage"><a class="link" href="#general-usage">
|
|
496
|
+
<h2 id="general-usage"><a class="link" href="#general-usage">3. General Usage</a></h2>
|
|
495
497
|
<div class="sectionbody">
|
|
496
498
|
<div class="paragraph">
|
|
497
499
|
<p>When a control callback is executed, it receives a <code>GameEvent</code>. This allows the game logic to react based on the key type and interact with the <code><a href="../interfaces/modules/Grid.html">Grid</a></code>, <code><a href="../interfaces/modules/State.html">State</a></code>, or <code><a href="../interfaces/modules/Score.html">Score</a></code> modules.</p>
|