private void SetTextUILabels() { hpLabel.text = "HP " + player.GetLife(); pointsLabel.text = "POINTS " + gamePoints; if (player.GetCurrentWeapon() != null) { weaponName.text = player.GetCurrentWeapon().name; if (player.GetCurrentWeapon().name == "Flowerator") { weaponClip.text = player.GetCurrentWeapon().GetComponent <Flowerator>().GetMagazine() + " / " + player.GetCurrentWeapon().GetComponent <Flowerator>().GetAmmo(); } else { weaponClip.text = player.GetCurrentWeapon().GetComponent <Matatrampas>().GetMagazine() + " / " + player.GetCurrentWeapon().GetComponent <Matatrampas>().GetAmmo(); } } }