Exemple #1
0
 public void LoadShopInventory()
 {
     Debug.Log("Loading inventory for " + gameObject.name);
     shopInventory = EconomyManager.GetInstance().GetMarketInventory().GetInventory(gameObject.name).ToList(); //get this unit's inventory
     InventoryManager.GetInstance().GetShopInventory().LoadShopInventory(shopInventory, this);                 //load inventory window with this
     InventoryManager.GetInstance().GetShopDialogue().LoadShopDialogue(shopDialogue);                          //get shop dialog window
 }
Exemple #2
0
 //called after shop is exited to update inventory after transaction
 public void UpdateInventory(List <Item> items)
 {
     shopInventory = new List <Item>(items); //save over old shop
     EconomyManager.GetInstance().GetMarketInventory().UpdateShop(gameObject.name, items);
     GetComponent <UnitStateMachine>().RequestChangeState(StateMachine.States.Idle);
 }