Fix bug in map generation; tiles were being left out on rows containing player and enemy.

This commit is contained in:
Josiah VanderZee 2020-04-19 17:19:08 -05:00
parent 7d783883d4
commit 674868cf60

View File

@ -34,8 +34,10 @@ func load_level_file(filename):
var new_instance = map_desc[tile_str].instance()
if new_instance.type == "Player":
player = new_instance
row.append(map_desc[" "].instance())
elif new_instance.type == "Enemy":
enemy = new_instance
row.append(map_desc[" "].instance())
else:
row.append(new_instance)
new_instance.global_position = Vector2(x * SPACE, y * SPACE)