I want to store an Enemy type and Enemy weight (as in how powerful this enemy is) and have a spawn system that makes sure the total enemy "Weight" of all enemies isnt' greater than what is currently allowed, and will only spawn enemies that fit within the current weight liit. So something like this:
Enemy 1 weight = 1
Enemy 2 weight = 3
MaxWeightAllowed = 10
TotalCurrentWeight = 9
(Global Variable) next enemy = choose enemy where Enemy.Weight <= (MaxWeightAllowed - TotalCurrentWeight). 10 Max weight - 9 current weight comes out to 1, so i would want to go to any enemies that have a weight of 1, and randomly choose from within that family.
Would this best be done with an array, or dictionary? Thanks!