private void OnTriggerEnter(Collider other) { // Disable top mesh if player enters the ship or a building if (other.gameObject.tag == "Ship" || other.gameObject.tag == "Building") { other.GetComponent <MeshRenderer>().enabled = false; } if (other.gameObject.tag == "Extinguisher") { if (playerInventory.getShipPartAmount(Player_Inventory.ShipPart.Extinguisher) >= 1) { invExtFull.enabled = true; } } if (other.gameObject.tag == "Hammer") { if (playerInventory.getShipPartAmount(Player_Inventory.ShipPart.Hammer) >= 1) { invHammerFull.enabled = true; } } if (other.gameObject.tag == "Metal Pipe") { if (playerInventory.getShipPartAmount(Player_Inventory.ShipPart.Pipe) >= 1) { invPipeFull.enabled = true; } } if (other.gameObject.tag == "Spanner") { if (playerInventory.getShipPartAmount(Player_Inventory.ShipPart.Spanner) >= 1) { invSpannerFull.enabled = true; } } if (other.gameObject.tag == "Spring") { if (playerInventory.getShipPartAmount(Player_Inventory.ShipPart.Spring) >= 1) { invSpringFull.enabled = true; } } if (other.gameObject.tag == "Food") { if (playerInventory.getPickupAmount(Player_Inventory.Pickups.Food) >= 1) { invFoodFull.enabled = true; } } if (other.gameObject.tag == "PowerCell") { if (playerInventory.getPickupAmount(Player_Inventory.Pickups.Power) >= 1) { invPowerFull.enabled = true; } } if (other.gameObject.tag == "OxygenTank") { if (playerInventory.getPickupAmount(Player_Inventory.Pickups.Oxygen) >= 1) { invOxygenFull.enabled = true; } } }