@Override public void onSelect( Item item ) { //FIXME this safety check shouldn't be necessary //it would be better to eliminate the curItem static variable. if (!(curItem instanceof InventoryStone)){ return; } if (item != null) { ((InventoryStone)curItem).onItemSelected( item ); } else{ curItem.collect( curUser.belongings.backpack ); } } };
@Override public void onSelect( Item item ) { //FIXME this safety check shouldn't be necessary //it would be better to eliminate the curItem static variable. if (!(curItem instanceof InventoryStone)){ return; } if (item != null) { ((InventoryStone)curItem).onItemSelected( item ); } else{ curItem.collect( curUser.belongings.backpack ); } } };