Godot 4.1 Tower Defense Tutorial - Part 03 (Resources and Singletons)
Hi again. I admire your persistence!
If we're going to make life easier for ourselves, we need to start thinking about making the Path Generator as a Singleton. So today, we're going to look at how Godot can autoloads scripts (aka Singletons), and how we can use resources to reference data saved to a file.
As always I appreciate feedback in any way (good or bad, but prefer good!). Please throw a like if you're enjoying... And maybe a subscribe if you're REALLY enjoying and want to see more!
Enjoy!
Github link: https://github.com/WideArchShark/godot-tower-defense/tree/tutorial_03a
Chapters:
0:00 Introduction
1:00 Community feedback
2:09 Singletons Introduction
4:30 Singletons in Godot (Autoloading)
7:40 Resources Introduction
8:35 Creating a Resource Script
10:38 Creating a Resource .res File
11:44 Referencing the Resource File From Path Generator
14:50 Refactoring Path Generator
15:26 Refactoring Main
16:15 Bit more tidying!
18:00 Prologue!