Insert default value.

This commit is contained in:
Nolan Darilek 2021-08-03 14:12:26 -05:00
parent dd84266039
commit 6fdbf4a667

View File

@ -226,7 +226,7 @@ fn spawn_colliders(
.insert(MapObstruction) .insert(MapObstruction)
.id(); .id();
if tile.blocks_visibility() { if tile.blocks_visibility() {
commands.entity(id).insert(BlocksVisibility); commands.entity(id).insert(BlocksVisibility::default());
} }
} }
} }
@ -323,7 +323,7 @@ fn spawn_colliders(
.insert(MapObstruction) .insert(MapObstruction)
.id(); .id();
if map.at(x as usize, y as usize).blocks_visibility() { if map.at(x as usize, y as usize).blocks_visibility() {
commands.entity(id).insert(BlocksVisibility); commands.entity(id).insert(BlocksVisibility::default());
} }
bottom_left = None; bottom_left = None;
bottom_right = None; bottom_right = None;