コード例 #1
0
        public void Update()
        {
            //FIXME: We don't need to run this every frame; scale it back

            float hue     = (1.0f / SCORE_WRAP_POINT) * (GameController.instance.GameEnv.Score + 1000);
            float adj_hue = hue % 1.0f; // loop

            //Debug.Log( adj_hue );
            RenderSettings.fogColor = Utils.HSVtoRGB(adj_hue, 0.35f, 0.82f);
        }
コード例 #2
0
 /*****************************/
 protected void RecolorMaterial()
 {
     _my_material.color = Utils.HSVtoRGB(Random.Range(0, 1.0f), 0.53f, 0.65f);
     gameObject.GetComponentInChildren <Renderer>().sharedMaterial = _my_material;
 }