30 Commits

Author SHA1 Message Date
3b87e838f6 docs: Create "dart" domain extension (#2278)
In Sphinx, there is a concept of a "domain", which enables documenting library object such as classes and functions, and then referencing them from any other place in the documentation. This PR adds such a domain for the Dart language.

With the new approach, a class/function can be documented using the following directive:

```{dartdoc}
📦 flame
:symbol: GameWidget
:file: src/game/game_widget/game_widget.dart
```

The documentation will then be automatically extracted from the referenced file using the dartdoc_json tool (published as a separate package), and then rendered inside the page. The screenshot below shows an example of how DialogueRunner class from Jenny would be rendered:

<image>

Once a symbol has been documented using the dartdoc directive, it can be referenced from other places in the documentation as

{ref}`DialogueRunner`
2023-01-25 21:17:25 +00:00
6548e9cb0a feat: Added the <<character>> command to Jenny (#2274)
The new command allows pre-declaring the characters that will be seen in the yarn scripts, and provides a place to store any additional information associated with each character.

The DialogueLine.character property now returns a Character object, instead of a String.
2023-01-14 15:42:13 +01:00
8b57eaa1ab docs: Documentation for markup in Jenny (#2262)
Added documentation for the markup syntax in Jenny.

    Fixed a small bug with spaces surrounding a self-closing markup tag.
2023-01-11 12:06:16 +01:00
087229ede5 feat: Added if() built-in function in Jenny (#2259)
The if() function can be used in place of a ternary-if operator.
2023-01-09 20:34:32 +01:00
ccc6eac199 docs: Add documentation for user-defined functions in Jenny (#2260)
The documentation for user-defined functions and the FunctionStorage class.
2023-01-09 08:30:44 +01:00
2eac6f5aa9 docs: Documentation for built-in functions in Jenny (#2258)
This PR adds missing documentation for all built-in functions available in Jenny.

In addition:

    The bool() function now behaves the same way as the conversion of arguments for an invocation of a user-defined function;
    Consequently, static sets trueValues/falseValues moved from CommandStorage class into the YarnProject;
    Added some tests for several other functions.
2023-01-08 22:17:40 +00:00
69c13568e6 docs: Added documentation for basic expressions in Jenny (#2256)
This PR describes variables and operators in the YarnSpinner language.
2023-01-08 10:53:38 +01:00
a90f90efc5 feat: Added command <<visit>> (#2233)
The functionality of the <<visit Target>> command is that the dialogue runner will temporarily suspend execution of the current node and start executing Target, but then once that finishes it will resume executing the original node.
2022-12-25 18:19:05 +00:00
e2ab129e59 feat: OnDialogueChoice now returns null by default (#2234)
Previously, onDialogueChoice was returning a never-completing future, which is both more error-prone, and prevents a use-case where a dialogue view would perform some async action without ultimately making a selection.
2022-12-25 18:07:20 +00:00
19a1f09acc feat: Added DialogueView.onNodeFinish event (#2229)
The onNodeFinish event is a counterpart to onNodeStart.
    This also fixes a small bug where node visit count was not properly incremented if the node was exited via a <<stop>>.
    The DialogueRunner.runNode() method renamed into startDialogue().
2022-12-23 00:02:44 +00:00
934585321f docs: Documentation for built-in commands in Jenny (#2231)
This adds/updates documentation for all built-in commands in Jenny.
2022-12-23 00:54:11 +01:00
0a9eaf3801 feat: Arguments of a UserDefinedCommand are now accessible (#2224)
Class UserDefinedCommand now exposes argumentString and arguments properties, allowing them to be queried in a DialogueView;
Make sure the arguments of a user-defined command are computed only once per invocation;
Added documentation for user-defined commands;
addDialogueCommand renamed into addOrphanedCommand.
2022-12-21 11:06:56 +00:00
a99c930381 docs: Description of jenny package (#2102)
Adding preliminary description for the jenny project
2022-12-16 07:57:06 +01:00
cbfa789e75 chore: Fix some spelling mistakes (#2148)
Fix all* typos reported by CSpell, and add some more words into the dictionaries.

(Except for two in the flame_isolate/example package).
2022-11-06 14:06:44 +00:00
4bf9563013 chore: Fix some spelling errors (#2146) 2022-11-05 12:17:48 +01:00
6d9bb7c354 docs: Added new directive {package} (#2128)
* Add {package} directive

* move css into a separate file

* Use {package} in Other Modules
2022-10-28 23:26:15 +01:00
0c451577e9 docs: Docs reorganization (#2063) 2022-10-23 23:02:49 +02:00
de04514e29 ci: Markdown linting (#1920)
Adds markdown linting to the CI and fixes up all the current files.
2022-09-19 21:17:50 +00:00
38284902fa docs: Update tiled docs example link (#1845) 2022-08-15 17:12:33 +02:00
112acf2aa7 feat: Adding support for additional layer rendering options (#1794)
This PR expands the functionality of RenderableTileMap to include support for more than just simple TileLayer layers. Adding support for:

    ImageLayer rendering (note that tiled.dart was loading non-tile layers in the incorrect order until 0.8.4)
    layer parallaxX / parallaxY
    layer opacity
    map backgroundColor

tiled dependency

This PR relies on changes and bug fixes in tiled.dart 0.8.4
2022-07-21 15:16:05 +02:00
ea354e3a81 docs: Documenting how to write documentation (#1721)
Since our documentation is fairly complex, we need to have a document which describes how various parts of it work. This PR adds such documentation.
2022-06-14 16:45:48 +02:00
c5af68b944 fix: Dead links and header formatting (#1663)
Fix all the dead links and add two new lines before each new header according to some form of markdown best practices.
2022-05-27 16:57:36 +02:00
5f346fc51a docs: Add Padracing game to the examples (#1651) 2022-05-26 19:32:52 +02:00
a50d4a1e7d feat!: enhance ContactCallback process (#1547)
Migration notes

The entire contact callback process has been redefined to mimic Flame's CollisionCallbacks.

In order to simplify the migration to this new code, the following steps should facilitate doing so:

    Remove lines of code that used addContactCallback, removeContactCallback, clearContactCallback.
    Remove subclasses of ContactCallbacks<Type1, Type2>.
    2.1. Include with ContactCallback in your BodyComponent class signature.
    2.2. Override the contact method that you are interested in, and check that other is Type2, then perform the logic.

The above is just a suggested migration approach. There are other code alternatives or patterns you might want to follow. In addition, you can define your own custom contact logic by providing a ContactListener to your Forge2DGame.

For more information check the examples, Flame documentation, or the class documentation of ContactCallbacks and WorldContactListener.
2022-04-22 13:04:10 +00:00
bdb360f181 feat!: Flip gravity in flame_forge2d to be able to mix Forge2D and Flame components (#1506) 2022-04-10 12:41:02 +00:00
45f7929556 fix: Fix warnings in documentation (#1472) 2022-03-20 12:15:58 +01:00
7fe8b6deb1 feat: BodyComponent can properly have normal Flame component children (#1442) 2022-03-13 15:04:54 +01:00
29dd09ca92 feat(collision detection)!: Use a broadphase to make collision detection more efficient (#1252) 2022-03-07 09:08:32 +01:00
a037ada5ea feat: Added getImageLayer to flame_tiled (#1405) 2022-02-27 16:53:44 +00:00
12cf8f7096 docs: Upgrade documentation site (#1365) 2022-02-13 07:50:13 +01:00