Trade menu WIP

This commit is contained in:
2022-05-22 08:51:51 +05:30
parent a83c7bcf91
commit 6018f9490c
6 changed files with 8220 additions and 1260 deletions

View File

@@ -53,7 +53,7 @@ public class SellMenu : MonoBehaviour
gemsTxt.text = DBmanager.Gems.ToString();
Button[] inventorySlots = inventoryParent.GetComponentsInChildren<Button>();
if(DBmanager.Inventory == null){Debug.Log("DBmanager isn't inited yet");return;}
if(inventorySlots.Length < DBmanager.Inventory.Count){
Debug.LogError("NEED MORE SLOTS!!!");
return;
@@ -173,8 +173,8 @@ public class SellMenu : MonoBehaviour
}
public void Sell(){
DBmanager.RemoveInventoryItem(selectedItem);
public async void Sell(){
await DBmanager.SellItem(selectedItem, coinsAmount, gemsAmount, metalAmount, oxygenAmount);
Clear();
}
}