Ok, either I'm stupidly misreading something, or you just need something like
if(FlashLightOn){
light.intensity = lightIntensity;
}
near the end of your Update()
↧