Methods are reusable bits of code
In Chapter 1, we learned to write code with the _ready()
method of a node. We saw that the code contained in this function would be executed from the moment our game started to run. Now, let’s look closer at what functions are and how we can use them.
Method versus function
The terminologies method and function are often used interchangeably. They denote two very similar concepts but applied in different ways. In this book, we’ll use both interchangeably.