DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

a09ccd015b3ce8ea1ab4350f6252298ad8160559 — Jonni Liljamo 1 year, 7 months ago 4821381
feat(client): move card type specific components
2 files changed, 8 insertions(+), 7 deletions(-)

M client/src/plugins/game/card/mod.rs
M client/src/plugins/game/supply/mod.rs
M client/src/plugins/game/card/mod.rs => client/src/plugins/game/card/mod.rs +0 -6
@@ 149,12 149,6 @@ fn on_spawn_card(
            (
                PickableBundle::default(),
                RapierPickTarget::default(),
                OnPointer::<Over>::target_component_mut::<Transform>(|_over, transform| {
                    transform.translation.y += 0.2;
                }),
                OnPointer::<Out>::target_component_mut::<Transform>(|_out, transform| {
                    transform.translation.y -= 0.2;
                }),
                OnPointer::<Click>::target_insert(ClickedCard),
            )
        );

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

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

use crate::{plugins::GameActionCreateCallEvent, api::game::{Action, Command}, Global, game_status::PlayerState};


@@ 55,7 56,13 @@ fn spawn_supply_piles(
                rigid_body: RigidBody::Fixed,
                ..Default::default()
            })
            .insert(visual_card_kind::Supply(index));
            .insert(visual_card_kind::Supply(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;
            }));
    }

    psp_ev_w.send(PositionSupplyPilesEvent);