Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

Best way to set the spawn of enemies

$
0
0
I have been looking for an answer for a long time, but I have not yet found a definitive one: my game is based on several levels (about 50) and in each level the player has to fight different waves of enemies; the number of waves and their composition vary from one level to another. For example: Level 1 (3 rounds): 10 knights, 3 goblin, 2 orcs; Level 2 (4 rounds): 3 skeletons, 2 goblin, 1 knight, 1 dragon. what is the best method to store information on each level and load it? I used a switch case that adds enemies of each round to a list containing enemies of the entire level, but I think that exists a better method. switch(level){ case 1: Enemies.Add(Name1, round); Enemies.Add(Name2, round); … case 2: Enemies.Add(Name1, round); Enemies.Add(Name2, round); … case n: Enemies.Add(Name1, round); Enemies.Add(Name2, round); … }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>