how to make a bool value to switch true and false in a fixed time interval?
Such a thing as below:
var on : boolean;
function Start() {
InvokeRepeating("TurnOnOffTheComputer", 0.0, 1.0 );
}
function TurnOnOffTheComputer() {
on = !on;
}
0.0 is the delay before the first run of TurnOnOff, 1.0 is the time between runs of the function.