occlusion part 2
This commit is contained in:
@@ -93,4 +93,21 @@ impl TilePrefab {
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn underground(position: Vec3, asset_server: &Res<AssetServer>) -> Self {
|
||||
TilePrefab {
|
||||
transform: Transform::from_translation(position).with_scale(Vec3::splat(PIXEL_RATIO)),
|
||||
sprite: Sprite {
|
||||
image: asset_server.load("underground.png"),
|
||||
..Default::default()
|
||||
},
|
||||
tile: Tile {
|
||||
id: 5,
|
||||
opaque: true,
|
||||
},
|
||||
tile_state: TileState {
|
||||
timer: Timer::from_seconds(1.0, TimerMode::Repeating),
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user