invaders: change enemy distribution
This commit changes the distribution of enemies so that each row contains only one type of enemy.
This commit is contained in:
parent
7b6ba906d4
commit
c846da24e1
|
@ -195,7 +195,7 @@ function enemies.setup()
|
|||
for y = 1, gamedata.enemies.rows do
|
||||
gamedata.enemies.data[y] = { }
|
||||
for x = 1, math.ceil((gamedata.enemies.count / gamedata.enemies.rows) + 1) do
|
||||
gamedata.enemies.data[y][x] = enemies.new( math.random(1, 3) )
|
||||
gamedata.enemies.data[y][x] = enemies.new((y % 3) + 1)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue