meow clippy
This commit is contained in:
parent
f6cd7d4b57
commit
6cdeb38ba4
2 changed files with 5 additions and 5 deletions
|
@ -83,7 +83,7 @@ pub fn add_player(
|
||||||
mgr: anims,
|
mgr: anims,
|
||||||
},
|
},
|
||||||
SpriteBundle {
|
SpriteBundle {
|
||||||
transform: Into::<Transform>::into(player_coords.clone()),
|
transform: (*player_coords).into(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
},
|
},
|
||||||
));
|
));
|
||||||
|
|
|
@ -24,16 +24,16 @@ pub struct PlayerCoords {
|
||||||
block_size: f32,
|
block_size: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Into<Transform> for PlayerCoords {
|
impl From<PlayerCoords> for Transform {
|
||||||
fn into(self) -> Transform {
|
fn from(val: PlayerCoords) -> Self {
|
||||||
let PlayerCoords { x, y, block_size } = self;
|
let PlayerCoords { x, y, block_size } = val;
|
||||||
Transform {
|
Transform {
|
||||||
translation: Vec3 {
|
translation: Vec3 {
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
z: PLAYER_DEPTH,
|
z: PLAYER_DEPTH,
|
||||||
},
|
},
|
||||||
scale: Vec3::splat(self.block_size * PLAYER_SIZE_FRACTION),
|
scale: Vec3::splat(val.block_size * PLAYER_SIZE_FRACTION),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue