Blinking light C sharp

Hi,

I am new to unity 3d. I need to make blinking lighting affect in my game. How can I write in c sharp.

I found a code online, which is working for my game, but it is in javascript. Can somebody help me convert it to c sharp.

var FlashingLight : Light;
FlashingLight.enabled = false;

function FixedUpdate () {

var RandomNumber = Random.value;

if(RandomNumber <= .7){
FlashingLight.enabled = true;

}
else FlashingLight.enabled = false;

}

Hey @jacszz,

Your question is very common: how do I convert X script between JS and C#? To help answer it, I put together a handy blog post detailing everything you need to know:

http://fragileearthstudios.com/2011/10/18/unity-converting-between-c-and-javascript-2/

Good luck!