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