generated from tipragot/rust
Add a rendering system using temporary images #61
|
@ -26,7 +26,7 @@ struct TilesGap(Vec2);
|
|||
#[derive(Resource, Clone, Copy)]
|
||||
struct TilesSize(Vec2);
|
||||
|
||||
impl Tile {
|
||||
impl Tile {
|
||||
/// Returns the handle of the image of the tile.
|
||||
fn get_texture(&self, asset_server: &AssetServer) -> Handle<Image> {
|
||||
match self {
|
||||
|
@ -37,6 +37,9 @@ impl 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 {
|
||||
CoCo_Sol marked this conversation as resolved
|
||||
match self {
|
||||
Self::Grass => Vec2 {
|
||||
|
|
Loading…
Reference in a new issue
Add a TODO to tell it is temporary. I think we shoud make an image managment system to not hardcode this.