[][src]Function rust_action_heroes::entity::make_floors

pub(crate) fn make_floors(
    world: &mut World,
    sprite_sheet_handle: &Handle<SpriteSheet>,
    floor_coordinates: Vec<(i16, i16)>
) -> Vec<Entity>

Makes the floors entities.

Floors are actually pretty boring. They're just sprites that exist in space. You can't interact with them, the just sit there.

So lazy.

One interesting thing is that they caused a hilarious bug where sometimes the floor would cover up another entity because all entities were at the same Z coordinate, so pretty much at random an entity we care about (like a player or a crate) would be covered up by floor sprites.

The solution to that bug, which I only determined after convincing myself it wasn't some weird sprite loading bug, was to put sprites at a different Z level so they're much lower than eveything else. The game is orthographic so floor tiles don't look far way thankfully.