diff --git a/src/components.rs b/src/components.rs index eadb1e9..94939d9 100644 --- a/src/components.rs +++ b/src/components.rs @@ -55,14 +55,30 @@ impl MenuStates { #[derive(Component, PartialEq, Copy, Clone, Debug)] pub enum ActorType { // Entity? Character? Creature? Actor? Avatar? Unit? Agent? - Human, + Dwarf, + ManCrazy, + Elf, + Teen, + Ranger, + Woman, + Man, + Man2, + ManCave, Pig, Rat, } impl ActorType { pub fn sprite_row_and_col(&self) -> (usize, usize) { match self { - ActorType::Human => (66, 46), + ActorType::Dwarf => (59 ,13), + ActorType::ManCrazy => (59, 15), + ActorType::Elf => (59, 18), + ActorType::Teen => (60, 11), + ActorType::Ranger => (59, 22), + ActorType::Woman => (60, 48), + ActorType::Man => (66, 46), + ActorType::Man2 => (60, 21), + ActorType::ManCave => (60, 25), ActorType::Pig => (64, 0), ActorType::Rat => (64, 19), } diff --git a/src/startup.rs b/src/startup.rs index ad66f72..b7297a1 100644 --- a/src/startup.rs +++ b/src/startup.rs @@ -24,8 +24,13 @@ pub fn startup( // GENERATE UNITS for i in 1..6 { let position = Position { x: 3, y: 3*i, z: 0 }; - let sprite = TextureAtlasSprite::new(ActorType::Human.sprite_index()); // TO DO - + let actor_type = match i { + 1 => ActorType::Man2, + 2 => ActorType::Dwarf, + _ => ActorType::Man + }; + let sprite = TextureAtlasSprite::new(actor_type.sprite_index()); + commands.spawn(SpriteSheetBundle { sprite, texture_atlas: sprite_sheet.0.clone(),