// Update is called once per frame void Update() { if (sc.gunType == 0 && image.color != akColor) { image.color = akColor; ammoText.color = akColor + white; } else if (sc.gunType == 1 && image.color != smgColor) { image.color = smgColor; ammoText.color = smgColor + white; } else if (sc.gunType == 2 && image.color != sniperColor) { image.color = sniperColor; ammoText.color = sniperColor + white; } if (sc.reloadTime == 0) { image.fillClockwise = false; image.fillAmount = sc.AmmoPercentage(); } else { image.fillClockwise = true; image.fillAmount = sc.ReloadPercentage(); } ammoText.text = sc.GetAmmoText(); }