pickup hanlder
This commit is contained in:
@@ -13,6 +13,11 @@ impl Item {
|
||||
pub fn none() -> Self {
|
||||
Default::default()
|
||||
}
|
||||
|
||||
// set item and return the current item
|
||||
pub fn set_item(&mut self, item: Entity) -> Option<Entity> {
|
||||
self.0.replace(item)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn plugin(app: &mut App) {
|
||||
@@ -20,7 +25,6 @@ pub fn plugin(app: &mut App) {
|
||||
}
|
||||
|
||||
fn bottom_panel(mut egui_ctx: EguiContexts, item_query: Query<&Item, With<Player>>) {
|
||||
dbg!(single!(item_query));
|
||||
egui::TopBottomPanel::bottom("inventory_toolbar")
|
||||
.frame(egui::Frame {
|
||||
fill: egui::Color32::from_rgba_premultiplied(0, 0, 0, 0),
|
||||
|
||||
Reference in New Issue
Block a user