DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

93d344306e393a39d462d9b9d39225c56abf19d4 — Jonni Liljamo 1 year, 7 months ago 3f27ac6
feat(client): hover cards in hand
1 files changed, 12 insertions(+), 1 deletions(-)

M client/src/plugins/game/hand/mod.rs
M client/src/plugins/game/hand/mod.rs => client/src/plugins/game/hand/mod.rs +12 -1
@@ 7,6 7,7 @@
 */

use bevy::prelude::*;
use bevy_mod_picking::prelude::*;
use bevy_rapier3d::prelude::*;

use crate::{


@@ 72,7 73,17 @@ fn spawn_hand(
                rigid_body: RigidBody::Fixed,
                ..Default::default()
            })
            .insert(visual_card_kind::Hand(index));
            .insert(visual_card_kind::Hand(index))
            .insert(OnPointer::<Over>::target_component_mut::<Transform>(
                |_over, transform| {
                    transform.translation.y += 0.2;
                },
            ))
            .insert(OnPointer::<Out>::target_component_mut::<Transform>(
                |_over, transform| {
                    transform.translation.y -= 0.2;
                },
            ));
    }

    ph_ev_w.send(PositionHandEvent);