summaryrefslogtreecommitdiff
path: root/src/playerstate.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-02-21 19:43:43 +0100
committertroido <troido@protonmail.com>2020-02-21 19:43:43 +0100
commit1f85c11d0ebb0a879b7825b8e78e473a77d8b778 (patch)
treea1d4d274bd107bddefa425fdf255cbdc123cd904 /src/playerstate.rs
parent4ed2d71e76f04c75a214e43363dc1b64e109fe3d (diff)
sprites are not strings anymore
Diffstat (limited to 'src/playerstate.rs')
-rw-r--r--src/playerstate.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/playerstate.rs b/src/playerstate.rs
index f167d36..2103f22 100644
--- a/src/playerstate.rs
+++ b/src/playerstate.rs
@@ -8,7 +8,8 @@ use crate::{
RoomId,
components::{Visible, Player, Inventory, Health, Item},
Result,
- aerr
+ aerr,
+ Sprite
};
#[derive(Debug, Clone)]
@@ -86,7 +87,7 @@ impl PlayerState {
pub fn construct(&self) -> PreEntity {
vec![
- ComponentWrapper::Visible(Visible{sprite: "player".to_string(), height: 1.0}),
+ ComponentWrapper::Visible(Visible{sprite: Sprite{name: "player".to_string()}, height: 1.0}),
ComponentWrapper::Player(Player::new(self.id.clone())),
ComponentWrapper::Inventory(Inventory{
items: self.inventory.iter().map(