GDScript basics: improve match explanation

Co-authored-by: Jacob Gray <jacopo.grayscale@gmail.com>
This commit is contained in:
Max Hilbrunner
2020-05-17 18:25:04 +02:00
parent 522e8e21b3
commit b24b9ad9a5

View File

@@ -862,8 +862,8 @@ Basic syntax::
**Control flow**:
The patterns are matched from top to bottom.
If a pattern matches, the corresponding block will be executed. After that, the execution continues below the ``match`` statement.
If you want to have a fallthrough, you can use ``continue`` to stop execution in the current block and check the ones below it.
If a pattern matches, the first corresponding block will be executed. After that, the execution continues below the ``match`` statement.
If you want to have a fallthrough, you can use ``continue`` to stop execution in the current block and check for an additional match in the patterns below it.
There are 6 pattern types: