Trade menu WIP
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user