lib-unity-demo-sewer-Assets--Scripts-screenFlicker.js / js
private var initialColor : Color; private var flicker = 0.0; function Start() { initialColor = renderer.material.GetColor("_TintColor"); } function Update () { if (Random.value >= 0.7) { flicker = Random.value + 0.2; renderer.material.SetColor ("_TintColor", Color(initialColor.r * flicker, initialColor.g * flicker, initialColor.b * flicker)); } }
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.