hi,
I am trying to make a game where the user can only click twice (or thrice) on some object after which the click will be non functional.(using OnMouseDown function, Its just a click game)
The number of clicks is shared by many scripts in the scene and so i think its not a good idea to define that as a variable in each script as i might have to edit the script many times for each differnt level.
I am trying to make a single scipt which will hold tht number and the other scripts will reference tht number from that particular script.
Is it possible to do so??
I was trying to make that number as a static variable in a empty gameobject and then call it via other scripts but may be i am doing something wrong or its not possible… i also tried various GetComponent methods but i’m just not getting it. Can someone please help me out??