#Devember 2022 - The flu and a shaker
So, my devember started with 4 days of delay because I was on vacation. Not a big deal.
On the first day I just opened Godot and started to poke around. Exploring the editor. A lot of strange things.
I began reading the Godot introduction guide and watched a video of introduction for Unity users. I sadly had a long and strong flu, so I lost a ton of days.
I aimed to implement a button that makes a text shake. This is what I've learned in the process.
A Scene is composed out of nodes
Node is the base class, everything else is deriving from that. It has nothing. Yes, no useless transform on empty nodes. Yay!
A node can have a single script attached to it.
To add functionalities to a node one has to create a new node class, extending from some other Node class. Usually this is not required though.
The normal thing is that you add nodes, maybe base ones, and add a script to them.
You can expose things in the inspector via the export keyword.
To get another node from the inspector you have to expose a NodePath and get the node like this: onready var my_node : MyClass = get_node( that_nodepath ) as MyClass. Node the onready keyword, that makes this execute after the nodepath and scene is ready.
You can save and reuse scripts, or you can leave them unnamed and internal to the scene. To name a class you have to use class_name MyClass. If you use class MyInternalClass it would be another class, interal to your file and not the class of the script. I've lost a good hour on this.
You can wire callbacks via the inspector, except they are called signals. You can use the "Node" tab, where you'll see all signals, divided by class hierarchy. If you double click one of them a chooser window will pop-up. If you have some signals connected on a node, a wifi-like icon will appear on the scene hierarchy next to it.
Ah, every node structure you can save as a resource, and it's still called a Scene. So a Scene of Godot is like a prefab in Unity. I don't think you can have variants though, but I'm not sure. You can have local modifications of a Scene assets inside another one. So maybe its feasible to get something similar working.
Here is the video of what I managed to get working today.
In the next days I'll try to understand better the positionong and layouting of UI stuff. Fonts are another thigs that I didn't get. It seems to me that you have to make a font asset for each size you want to use.













