public void getInventory() { InventoryC.INVNTRY = new System.Collections.Generic.List <InventoryC>(); InventoryC.TOTAL_INVENT_VALUE = 0; string query = "SELECT * FROM Inventory;"; InventoryC inventory = new InventoryC(); OleDbConnection dbConnection = dbManager.openDb(); this.comand.Connection = dbConnection; comand.CommandText = query; OleDbDataReader result = comand.ExecuteReader(); while (result.Read()) { inventory.PareCode = result.GetString(0); inventory.MedName = result.GetString(1); inventory.OldAmount = result.GetDouble(2); inventory.OldValue = (double)result.GetDecimal(3); inventory.NewAmount = result.GetDouble(4); inventory.NewValue = result.GetDouble(5); inventory.TotalMedValue = inventory.OldValue + inventory.NewValue; InventoryC.INVNTRY.Add(inventory); inventory = new InventoryC(); } result.Close(); dbManager.closeDb(); }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { InventoryC inven = other.GetComponent <InventoryC>(); if (inven) { player = other.gameObject; enter = true; } } }
// Token: 0x06000370 RID: 880 RVA: 0x000125F0 File Offset: 0x000109F0 private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { InventoryC component = other.GetComponent <InventoryC>(); if (component) { this.player = other.gameObject; this.enter = true; } } }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "Player") { InventoryC inven = other.GetComponent <InventoryC>(); if (inven) { player = other.gameObject; itemQuantity = player.GetComponent <InventoryC>().itemQuantity; cash = player.GetComponent <InventoryC>().cash; itemSlot = player.GetComponent <InventoryC>().itemSlot; equipment = player.GetComponent <InventoryC>().equipment; enter = true; } } }
//[SerializeField] AudioClip craftingBGM; private void Start() { inventory = GetComponent <Inventory>(); if (object1) { object1.transform.SetAsLastSibling(); } if (object2) { object2.transform.SetAsLastSibling(); } if (object3) { object3.transform.SetAsLastSibling(); } if (object4) { object4.transform.SetAsLastSibling(); } inventory2 = GetComponent <Inventory2>(); if (product1) { product1.transform.SetAsLastSibling(); } if (product2) { product2.transform.SetAsLastSibling(); } if (product3) { product3.transform.SetAsLastSibling(); } if (product4) { product4.transform.SetAsLastSibling(); } if (product5) { product5.transform.SetAsLastSibling(); } if (product6) { product6.transform.SetAsLastSibling(); } if (product7) { product7.transform.SetAsLastSibling(); } if (crafting) { crafting.transform.SetAsLastSibling(); } if (craftbutton) { craftbutton.transform.SetAsLastSibling(); } if (product11) { product11.transform.SetAsLastSibling(); } if (product21) { product21.transform.SetAsLastSibling(); } if (product31) { product31.transform.SetAsLastSibling(); } if (product41) { product41.transform.SetAsLastSibling(); } if (product51) { product51.transform.SetAsLastSibling(); } if (product61) { product61.transform.SetAsLastSibling(); } if (product71) { product71.transform.SetAsLastSibling(); } inventoryC = GetComponent <InventoryC>(); EnableCrafting(false); restartbutton.SetActive(false); winner.enabled = false; score.enabled = false; }