Now that we have the revamped enemy system that makes the enemy spawning much more exciting, let's look at how we can improve the depth of enemy interaction in our game. In Part 4, when we first implemented stats for the enemy, we only had health, move speed and damage. In this part, we are going to add all the enemy stats you find in Vampire Survivors on our enemies, so that we are able to create enemies with more depth.
Creating a Rogue-like (like Vampire Survivors) in Unity — Part 22: Curse Boosts and All Enemy Stats
This article is a part of the series:
Creating a Rogue-like Shoot 'Em Up (like Vampire Survivors) in Unity
For all of part 7: Implementing enemy sorting, can’t this all be replaced by changing the project setting’s Transparency Sort Axis to (0, 1, 0), instead of the default of (0, 0, 1), as our game is 2D, not 3D?
Hello,
In the first EnemyStats script I was not able to copy paste it to my Visual Studio. My C# version was not sufficient. Indeed, unity use the C# 9.0 while the struct without the init require C# 10.0 or more.
[System.Serializable] public struct Resistances { [Range(0f, 1f)] public float freeze = 0f, kill = 0f, debuff = 0f; }
I saw that you remove the default value in the second EnemyStats script. Maybe you should do the same for the first one?
Hi Anthony, thanks for pointing this out. The script has been edited.