diff options
Diffstat (limited to 'pixel-client')
| -rw-r--r-- | pixel-client/assets/misc.ini | 4 | ||||
| -rw-r--r-- | pixel-client/assets/textures/chef.ta (renamed from pixel-client/assets/textures/player.ta) | 0 | ||||
| -rw-r--r-- | pixel-client/assets/textures/customer.ta (renamed from pixel-client/assets/textures/costumer.ta) | 0 | ||||
| -rw-r--r-- | pixel-client/src/game.rs | 9 | ||||
| -rw-r--r-- | pixel-client/src/render/misc.rs | 6 | 
5 files changed, 14 insertions, 5 deletions
| diff --git a/pixel-client/assets/misc.ini b/pixel-client/assets/misc.ini index f499bd51..59bd9132 100644 --- a/pixel-client/assets/misc.ini +++ b/pixel-client/assets/misc.ini @@ -1,6 +1,6 @@ -player=player -costumer=costumer +chef=chef +customer=customer  interact-target-thick=interact_target_thick  interact-target-thin=interact_target_thin  solid=solid diff --git a/pixel-client/assets/textures/player.ta b/pixel-client/assets/textures/chef.ta index 065a3255..065a3255 100644 --- a/pixel-client/assets/textures/player.ta +++ b/pixel-client/assets/textures/chef.ta diff --git a/pixel-client/assets/textures/costumer.ta b/pixel-client/assets/textures/customer.ta index 602b0b21..602b0b21 100644 --- a/pixel-client/assets/textures/costumer.ta +++ b/pixel-client/assets/textures/customer.ta diff --git a/pixel-client/src/game.rs b/pixel-client/src/game.rs index c129f991..f8feb1c8 100644 --- a/pixel-client/src/game.rs +++ b/pixel-client/src/game.rs @@ -360,7 +360,14 @@ impl Game {          }          for p in self.players.values() { -            ctx.draw_world(self.misc_textures.player.at(p.movement.position)); +            ctx.draw_world( +                if p._character >= 0 { +                    &self.misc_textures.chef +                } else { +                    &self.misc_textures.customer +                } +                .at(p.movement.position), +            );              if let Some(item) = &p.item {                  item.draw(ctx, &self.item_sprites, &self.misc_textures)              } diff --git a/pixel-client/src/render/misc.rs b/pixel-client/src/render/misc.rs index c1f1295e..05cde8e4 100644 --- a/pixel-client/src/render/misc.rs +++ b/pixel-client/src/render/misc.rs @@ -20,7 +20,8 @@ use hurrycurry_protocol::glam::Vec2;  use sdl2::rect::Rect;  pub struct MiscTextures { -    pub player: Sprite, +    pub chef: Sprite, +    pub customer: Sprite,      pub interact_target: Sprite,      pub solid: Rect,  } @@ -28,7 +29,8 @@ pub struct MiscTextures {  impl MiscTextures {      pub fn init(layout: &AtlasLayout) -> Self {          MiscTextures { -            player: Sprite::new(*layout.get("player+a").unwrap(), Vec2::Y * 0.3, 0.5 + 0.3), +            chef: Sprite::new(*layout.get("chef+a").unwrap(), Vec2::Y * 0.3, 0.5 + 0.3), +            customer: Sprite::new(*layout.get("customer+a").unwrap(), Vec2::Y * 0.3, 0.5 + 0.3),              interact_target: Sprite::new(                  *layout.get("interact-target-thick+a").unwrap(),                  Vec2::new(0.5, 1.0), | 
