* styleguide: clarify "static typing" syntax
I first explored making an update here because I felt the current docs were confusing:
1. I could not tell if everything below "bad" was actually bad... It seemed like some of it was "good".
2. The examples involving ` var health := 0 # The compiler will use the int type.` seemed redundant, and re: (1) it was confusing to see one in "good" and one in "bad".
Do you agree whether a change is merited or did I misunderstand the docs as written?
---
While writing this proposed update, I realize that my explanation is less focused on style, but instead also explaining how declared and inferred types work. Is that what we expect in the style guide, or is the intent to be laser-focused it on syntax and code clarity? If so, perhaps we should avoid explanation and use the linked static typing guide as the source of truth for a rich explanation: https://docs.godotengine.org/en/stable/getting_started/scripting/gdscript/static_typing.html#doc-gdscript-static-typing).
Thanks for the awesome game engine!
* clarify why it doesn't work in the get_node() case
As of 3.2.2 the icon for Object Properties is no longer a down arrow, it is now a tools emoji. It's also not clear from the sentence the tutorial is expecting the user to look for the Object Properties button, just 'the down arrow', so I added clarity there as well.
Changes:
- Simplify the article
- Change the title to better reflect the guide's point
- Try to make it clearer that scripts and scenes are not actually
- classes, but rather to be thought of as if they were classes in an OO
- language; OO principles apply to them
- Move section about the performances of scripts vs PackedScene to scenes_versus_scripts.rst
In Godot 4.0, the connect() function no longer takes an object and
a string name of a function, but rather the new Callable type. Following
the old instructions leads to errors.
Unfortunately, I don't have C# development set up on my machine, so I
have not updated the C# examples as I'm currently unable to validate that
they work as intended.
This is a section for beginners, and until this point,
the writing has been easy and accessible, but the GDScript
Reference is over 6.2k words long and difficult to grok in
a few minutes by a beginner.
This commit changes this sentence to instead suggest skimming
and bookmarking the page for later, because I think this was
the original intent.