// Update is called once per frame void Update() { float rawScale = ControlScale.CurrentScaleValue; this.currentHue = ControlScale.Rescale(rawScale, this.minHue, this.maxHue); this.theMaterial.color = ColorUtility.HSVToRGB(this.currentHue, this.saturation, this.lightness); this.theMaterial.SetColor("_EmissionColor", ColorUtility.HSVToRGB(this.currentHue, 1.0f, 0.5f)); }
// Update is called once per frame void Update() { float rawScale = ControlScale.CurrentScaleValue; this.currentHue = ControlScale.Rescale(rawScale, this.minHue, this.maxHue); this.theLight.color = ColorUtility.HSVToRGB(this.currentHue, this.saturation, this.lightness); this.currentIntensity = ControlScale.Rescale(rawScale, this.minIntensity, this.maxIntensity); this.theLight.intensity = this.currentIntensity; }
// Update is called once per frame void Update() { Vector3 newScale = theTransform.localScale; float rawScale = ControlScale.CurrentScaleValue; float finalScale = ControlScale.Rescale(rawScale, this.minScale, this.maxScale); newScale.Set(finalScale, finalScale, finalScale); this.theTransform.localScale = newScale; }
// Update is called once per frame void Update() { float rawScale = ControlScale.CurrentScaleValue; this.currentScoreIncrement = ControlScale.Rescale(rawScale, this.minScoreIncrement, this.maxScoreIncrement); this.currentKillBonusMultiplier = ControlScale.Rescale(rawScale, this.minKillBonusMultiplier, maxKillBonusMultiplier); // Add to the score, just for staying alive GameplayController.IncrementScore((int)this.currentScoreIncrement); }
// Update is called once per frame void Update() { if (!GameplayController.IsGameOver()) { float rawScale = ControlScale.CurrentScaleValue; float rotationSpeed = ControlScale.Rescale(rawScale, this.minRotateSpeed, this.maxRotateSpeed); Vector3 newRot = this.theTransform.eulerAngles; newRot.Set(0.0f, newRot.y + rotationSpeed * Time.deltaTime, 0.0f); this.theTransform.eulerAngles = newRot; } }
// Update is called once per frame void Update() { if (GameplayController.IsGameOver()) { float rawScale = ControlScale.CurrentScaleValue; float speedMultiplier = ControlScale.Rescale(rawScale, 1.0f, 4.0f); Vector3 newPosition = this.theTransform.position; newPosition = newPosition + this.transform.right * (this.driftSpeed * speedMultiplier * Time.deltaTime); this.theTransform.position = newPosition; Vector3 newRotation = this.theTransform.rotation.eulerAngles; newRotation = newRotation + this.randomDriftRotation * (this.driftSpeed * 2.0f * Time.deltaTime); this.theTransform.eulerAngles = newRotation; } }