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) { commands.spawn(( Statue, SpriteSheetBundle { texture_atlas: assets.images.statue.clone(), sprite: TextureAtlas::new(0), transform: Transform::from_translation(Vec3::new(50., 50., 0.)), ..Default::default() }, )); commands.spawn(( Statue, SpriteSheetBundle { texture_atlas: assets.images.statue.clone(), sprite: TextureAtlas::new(0), transform: Transform::from_translation(Vec3::new(50., 100., 0.)), ..Default::default() }, )); }