update to BTB release!
This commit is contained in:
@@ -12,21 +12,11 @@ pub struct ProjectileOrigin;
|
||||
#[derive(Component, Debug)]
|
||||
pub struct AnimatedCharacter {
|
||||
head: usize,
|
||||
rotate_180: bool,
|
||||
}
|
||||
|
||||
impl AnimatedCharacter {
|
||||
pub fn new(head: usize) -> Self {
|
||||
Self {
|
||||
head,
|
||||
rotate_180: false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn with_rotation(self) -> Self {
|
||||
let mut s = self;
|
||||
s.rotate_180 = true;
|
||||
s
|
||||
Self { head }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,9 +82,7 @@ fn spawn(
|
||||
let mut t =
|
||||
Transform::from_translation(Vec3::new(0., -1.45, 0.)).with_scale(Vec3::splat(1.2));
|
||||
|
||||
if character.rotate_180 {
|
||||
t.rotate_y(PI);
|
||||
}
|
||||
t.rotate_y(PI);
|
||||
|
||||
commands
|
||||
.entity(entity)
|
||||
|
||||
Reference in New Issue
Block a user