Skip to content

Commit

Permalink
reintroduce TileMapChunk marker
Browse files Browse the repository at this point in the history
  • Loading branch information
Kurble authored and dmtaub committed Jun 16, 2021
1 parent 3ee4a7b commit 5e802b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ mod pipeline;
pub use pipeline::*;
mod tile_chunk;
pub use tile_chunk::*;

pub struct TileMapChunk;
4 changes: 3 additions & 1 deletion src/view/tile_chunk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use bevy::{
};
use tiled::{LayerTile, Tileset};

use crate::{loader::TiledMapLoader, Map, TILE_MAP_PIPELINE_HANDLE};
use crate::{loader::TiledMapLoader, Map, TileMapChunk, TILE_MAP_PIPELINE_HANDLE};

#[derive(Debug)]
pub struct LayerChunk {
Expand Down Expand Up @@ -83,6 +83,7 @@ impl LayerChunk {
#[derive(Bundle)]
pub struct ChunkBundle {
pub map_parent: Handle<Map>, // tmp:chunks should be child entities of a toplevel map entity.
pub chunk: TileMapChunk,
pub main_pass: MainPass,
pub material: Handle<ColorMaterial>,
pub render_pipeline: RenderPipelines,
Expand All @@ -97,6 +98,7 @@ impl Default for ChunkBundle {
fn default() -> Self {
Self {
map_parent: Handle::default(),
chunk: TileMapChunk,
visible: Visible {
is_transparent: true,
..Default::default()
Expand Down

0 comments on commit 5e802b8

Please sign in to comment.