Update crates/border-wars/src/map/renderer.rs
Some checks failed
Rust Checks / checks (push) Failing after 6s
Rust Checks / checks (pull_request) Failing after 6s

This commit is contained in:
CoCo_Sol 2024-03-05 17:33:30 +00:00
parent 530922aa88
commit e3049a126a

View file

@ -26,7 +26,7 @@ struct TilesGap(Vec2);
#[derive(Resource, Clone, Copy)] #[derive(Resource, Clone, Copy)]
struct TilesSize(Vec2); struct TilesSize(Vec2);
impl Tile { impl Tile {
/// Returns the handle of the image of the tile. /// Returns the handle of the image of the tile.
fn get_texture(&self, asset_server: &AssetServer) -> Handle<Image> { fn get_texture(&self, asset_server: &AssetServer) -> Handle<Image> {
match self { match self {
@ -37,6 +37,9 @@ impl Tile {
} }
/// Returns the size of the image of the tile. /// Returns the size of the image of the tile.
///
/// TODO: we are currently using temporary images that will modify
/// this function in the future.
const fn get_image_size(&self) -> Vec2 { const fn get_image_size(&self) -> Vec2 {
match self { match self {
Self::Grass => Vec2 { Self::Grass => Vec2 {