Godot 4.1 Tower Defense Tutorial - Part 04 (Enemy Waves and States)
Hi everyone, I hope your week is going well ! So sorry for the delay getting this one out. It's been a tough week at work, which I won't bore you with!!
Anyhow, it's time to get those enemies rolling across the screen in a wave fashion. Let's talk about the State Pattern, and how we can use it to make our code clean and easy to use.
As always, I hope you will give this video a thumbs up if you're enjoying it... And maybe a subscribe if you're feeling it. And I always appreciate comments, and will do my best to respond to every one of them.
Enjoy!
Links:
Github source code: https://github.com/WideArchShark/godot-tower-defense/tree/tutorial_04
Godot State Charts Documentation: https://github.com/derkork/godot-statecharts/blob/main/manual/manual.md
Chapters:
0:00 Introduction (1)
0:50 Introduction (2)
1:36 State Patterns Overview
3:15 Godot State Charts Installation
4:30 Creating an Enemy with States
7:50 State Signals
10:40 Path3D
13:20 Creating Curve3D in Code
15:05 PathFollow3D
19:00 Creating a Spawn Animation
22:15 State Transitions
24:50 Making the Enemy Move
27:00 Moving to Despawning
30:25 Despawn Animation
32:00 Removing the Enemy from the Tree
32:40 Generating a Wave of Enemies!
34:21 Teaser for Next Episode!