How to change a bool value in game?

Hello all.

I’m trying to sharpen up my C# coding and thought it best to start at the bottom, again. I’ve been following the tutorials on this site - http://catlikecoding.com/unity/tutorials/clock/

I need a little bit of advice on the matter tho.

In the clockanimation.cs script there is a bool value to toggle the clock analog/digital.

How can I change that value to true/false in game using a button.

I have already added an “exit” button to the game to terminate the program but are having issues implenting the analog true/false button. I have a button script attached to an empty game object in the scene to handle all the button I want to add.

Any advice or help would be of great value.

Thank you in advance.

PS: sorry, using my phone to post this question, not near my pc or have my code handy. Also if I don’t make any sense, just curse me. :wink:

If you are talkin about how to toogle bool value via GUI.Button here is the way:

bool myBool;
if(GUI.Button(Rect))
{
myBool = !myBool;
}