C
C#11mo ago
Quarkツ

How Do I Add Spawn Chances For An Enemy Per Area?

c#
List<Enemy> ExperimentationEnemies = new List<Enemy>();
ExperimentationEnemies.Add(New .....)
c#
List<Enemy> ExperimentationEnemies = new List<Enemy>();
ExperimentationEnemies.Add(New .....)
Enemies currently contain a Name, Health, Damage and Attackspeed. I am now not sure where or how I should add Spawnchances.
1 Reply
Denis
Denis11mo ago
Separation of concerns - definitely not into the enemy class. You probably put it into the class representing the area The chances would be represented by a dictionary, where the key is some identifier of the enemy type, and the value is the chance Or maybe you can use some other collection type Whatever suits your needs
Want results from more Discord servers?
Add your server