2023-12-23 16:50:08 -06:00
|
|
|
use bevy::prelude::*;
|
|
|
|
|
|
|
|
use crate::assets::AssetLoader;
|
|
|
|
|
|
|
|
#[derive(Component, Debug)]
|
|
|
|
pub struct Statue;
|
|
|
|
|
|
|
|
impl Plugin for Statue {
|
|
|
|
fn build(&self, app: &mut App) {
|
|
|
|
app.add_systems(PostStartup, spawn_statue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn spawn_statue(mut commands: Commands, assets: Res<AssetLoader>) {
|
|
|
|
commands.spawn((
|
|
|
|
Statue,
|
|
|
|
SpriteSheetBundle {
|
2023-12-24 21:30:18 -06:00
|
|
|
texture_atlas: assets.images.statue.clone(),
|
2024-05-17 09:11:33 -05:00
|
|
|
sprite: TextureAtlas::new(0),
|
2023-12-23 16:50:08 -06:00
|
|
|
transform: Transform::from_translation(Vec3::new(50., 50., 0.)),
|
|
|
|
..Default::default()
|
|
|
|
},
|
|
|
|
));
|
|
|
|
commands.spawn((
|
|
|
|
Statue,
|
|
|
|
SpriteSheetBundle {
|
2023-12-24 21:30:18 -06:00
|
|
|
texture_atlas: assets.images.statue.clone(),
|
2024-05-17 09:11:33 -05:00
|
|
|
sprite: TextureAtlas::new(0),
|
2023-12-23 16:50:08 -06:00
|
|
|
transform: Transform::from_translation(Vec3::new(50., 100., 0.)),
|
|
|
|
..Default::default()
|
|
|
|
},
|
|
|
|
));
|
|
|
|
}
|