DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

5eb68743888e7bb529a8d0e31aadbac396cbc286 — Jonni Liljamo 1 year, 7 months ago d575e76
fix(client): give card default translation, fix rotation
1 files changed, 14 insertions(+), 1 deletions(-)

M client/src/plugins/game/card/mod.rs
M client/src/plugins/game/card/mod.rs => client/src/plugins/game/card/mod.rs +14 -1
@@ 19,6 19,16 @@ impl Plugin for CardPlugin {
    }
}

// NOTE: kind of like using enum variants
pub mod visual_card_kind {
    use bevy::prelude::*;

    #[derive(Component)]
    pub struct Normal;
    #[derive(Component)]
    pub struct Supply(pub usize);
}

#[derive(Component)]
pub struct VisualCard {
    pub card: Card,


@@ 56,7 66,10 @@ impl Default for VisualCardBundle {
        Self {
            visual_card: VisualCard::default(),
            transform: Transform {
                rotation: Quat::from_euler(EulerRot::XYZ, -90., 0., 0.),
                translation: Vec3 { x: 0., y: 0., z: 0. },
                /// defaults to being rotated 90 degress on X, so flat on the
                /// table.
                rotation: Quat::from_euler(EulerRot::XYZ, -1.571, 0., 0.),
                ..Default::default()
            },
            global_transform: GlobalTransform::default(),