I am trying to increase a light to get a camera flash effect with a coroutine, but for some reason I cannot increment the light’s intensity. This is what I have so far:
IEnumerator CameraFlash( tk2dAnimatedSprite sprite ){
GameObject flare = GameObject.Find( "CameraFlare" );
flare.light.intensity = 0;
float steps = (float) (3 / 9);
while(flare.light.intensity < 3){
yield return null;
flare.light.intensity = steps;
steps+=steps;
}
}