summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index b73c54a..8a59000 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -40,11 +40,12 @@ pub fn setup(
) {
let background = asset_server.load("background.png");
let tileset = asset_server.load("tileset.png");
+ let title = asset_server.load("title.png");
let atlas = TextureAtlas::from_grid(
tileset,
Vec2::new(constants::TILE_SIZE, constants::TILE_SIZE),
- 4,
+ 5,
5,
);
let atlas_handle = texture_atlases.add(atlas);
@@ -59,6 +60,15 @@ pub fn setup(
},
..Default::default()
});
+ commands.spawn_bundle(SpriteBundle {
+ material: materials.add(title.into()),
+ transform: Transform {
+ translation: Vec3::new(240.0, 200.0, 0.0),
+ scale: Vec3::splat(2.0),
+ ..Default::default()
+ },
+ ..Default::default()
+ });
commands.spawn_bundle(SpriteSheetBundle {
sprite: TextureAtlasSprite::new(constants::TILESHEET_COSMONAUT1),
texture_atlas: atlas_handle.clone(),
@@ -93,7 +103,7 @@ pub fn setup(
sprite: TextureAtlasSprite::new(constants::TILESHEET_NONE1),
transform: Transform {
translation: Vec3::new(
- ((i as f32) * constants::TILE_SIZE * constants::TILE_SCALE) - 320.0,
+ ((i as f32) * constants::TILE_SIZE * constants::TILE_SCALE) - 330.0,
((j as f32) * constants::TILE_SIZE * constants::TILE_SCALE) - 160.0,
1.0,
),