void Update() { //if color meter should be decreasing if (!_color.Equals(ColorElement.White)) { DeductTime(); } }
void Update() { if (!Data.GameManager.SuspendedState) { //if color meter should be decreasing if (!_color.Equals(ColorElement.White)) { DeductTime(); } } }
void Start() { //color the orb based on the assign color; stick with rgb for now if (_color.Equals(ColorElement.Red)) { renderer.material.color = Color.red; } else if (_color.Equals(ColorElement.Green)) { renderer.material.color = Color.green; } else if (_color.Equals(ColorElement.Blue)) { renderer.material.color = Color.blue; } else { Debug.LogError("Colors for orbs should just be rgb"); } }
void Start() { //color the orb based on the assign color; stick with rgb for now if (_color.Equals(ColorElement.Red)) { GetComponent <Renderer>().material.color = Color.red; } else if (_color.Equals(ColorElement.Green)) { GetComponent <Renderer>().material.color = Color.green; } else if (_color.Equals(ColorElement.Blue)) { GetComponent <Renderer>().material.color = Color.blue; } else { Debug.LogError("Colors for orbs should just be rgb"); } this.GetComponentInChildren <ParticleSystem>().startColor = CustomColor.GetColor(_color); }
//Update UI spheres public void UpdateSpheres(ColorElement _color) { if (CustomColor.GetColor(_color).r > 0) { _r.UpdateSphereColor(ColorElement.Red); } else { _r.UpdateSphereColor(ColorElement.White); } if (CustomColor.GetColor(_color).g > 0) { _g.UpdateSphereColor(ColorElement.Green); } else { _g.UpdateSphereColor(ColorElement.White); } if (CustomColor.GetColor(_color).b > 0) { _b.UpdateSphereColor(ColorElement.Blue); } else { _b.UpdateSphereColor(ColorElement.White); } if (_color.Equals(ColorElement.Black)) { _r.UpdateSphereColor(ColorElement.Black); _g.UpdateSphereColor(ColorElement.Black); _b.UpdateSphereColor(ColorElement.Black); } }