void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Item")) { items[other.GetComponent <ItemScript>().itemID].count++; other.gameObject.SetActive(false); main.UpdateText(); } if (other.gameObject.CompareTag("SellPoint")) { for (int i = 0; i < items.Count; i++) { if (items[i].count != 0) { main.moneyTotal += items[i].value * items[i].count; main.weightTotal -= items[i].weight * items[i].count; items[i].count = 0; main.UpdateText(); } } } if (other.gameObject.CompareTag("FinishPoint")) { main.GoToPoint(other.GetComponent <ItemScript>().itemID); } if (other.gameObject.CompareTag("Death")) { //TODO DEAD } if (other.gameObject.CompareTag("OpenStairs")) { main.RaiseStairs(other.GetComponent <ItemScript>().itemID); } if (other.gameObject.CompareTag("Bots")) { main.damagePlayer = true; } }