示例#1
0
        private void SetSellAmount()
        {
            //remove Living Impact
            if (!m_currProduct.IsSellingWorld && Inventory.Instance.m_Inventory[m_currProduct] > 0)
            {
                Gameplay.Buildings.BuildingManager.Instance.Living_NeedAmount -= m_currProduct.m_ImpactOnLiving * Inventory.Instance.m_SellingAmount[m_currProduct];
            }

            //after remove set new Amount
            Inventory.Instance.SetSellingAmount(m_currProduct, UIManager.ConvertStringToFloat(m_InputField.text));
            UIManager.Instance.UpdateInventoryItem(m_currProduct);

            //add living impact if selling on local
            if (!m_currProduct.IsSellingWorld && Inventory.Instance.m_Inventory[m_currProduct] > 0)
            {
                Gameplay.Buildings.BuildingManager.Instance.Living_NeedAmount += m_currProduct.m_ImpactOnLiving * Inventory.Instance.m_SellingAmount[m_currProduct];
            }
        }