fix main branch
This commit is contained in:
@@ -48,33 +48,32 @@ pub fn handle_pick_up(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn handle_drop(
|
pub fn handle_drop(// mut commands: Commands,
|
||||||
mut commands: Commands,
|
// // current action
|
||||||
// current action
|
// mut action: Query<(&PlayerAction, &Transform, &mut Item), With<Player>>,
|
||||||
mut action: Query<(&PlayerAction, &Transform, &mut Item), With<Player>>,
|
// mut vis_query: Query<&mut Visibility>,
|
||||||
mut vis_query: Query<&mut Visibility>,
|
// mut item_transform: Query<&mut Transform, With<Interact>>,
|
||||||
mut item_transform: Query<&mut Transform, With<Interact>>,
|
// children: Query<&mut Children>,
|
||||||
children: Query<&mut Children>,
|
|
||||||
) {
|
) {
|
||||||
// let (action, transform, mut item) = single_mut!(action);
|
// let (action, transform, mut item) = single_mut!(action);
|
||||||
// if *action == PlayerAction::Drop {
|
// if *action == PlayerAction::Drop {
|
||||||
// if let Ok(mut vis) = vis_query.get_mut(target) {
|
// if let Ok(mut vis) = vis_query.get_mut(target) {
|
||||||
// *vis = Visibility::Hidden;
|
// *vis = Visibility::Hidden;
|
||||||
// }
|
|
||||||
// if let Ok(colliders) = children.get(target) {
|
|
||||||
// for &collider in colliders {
|
|
||||||
// commands.entity(collider).insert(ColliderDisabled);
|
|
||||||
// }
|
// }
|
||||||
// }
|
// if let Ok(colliders) = children.get(target) {
|
||||||
// if let Some(dropped) = replaced {
|
|
||||||
// if let Ok(mut vis) = vis_query.get_mut(dropped) {
|
|
||||||
// *vis = Visibility::Visible;
|
|
||||||
// }
|
|
||||||
// if let Ok(colliders) = children.get(dropped) {
|
|
||||||
// for &collider in colliders {
|
// for &collider in colliders {
|
||||||
// commands.entity(collider).remove::<ColliderDisabled>();
|
// commands.entity(collider).insert(ColliderDisabled);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if let Some(dropped) = replaced {
|
||||||
|
// if let Ok(mut vis) = vis_query.get_mut(dropped) {
|
||||||
|
// *vis = Visibility::Visible;
|
||||||
|
// }
|
||||||
|
// if let Ok(colliders) = children.get(dropped) {
|
||||||
|
// for &collider in colliders {
|
||||||
|
// commands.entity(collider).remove::<ColliderDisabled>();
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user