|
Hi, I am trying to learn some C#, and to that end I made this script to practice implementing a few things (properties, events, general C# syntax). The script: However, I am getting the following errors: Part of my objective in this exercise is to create a class that has methods that can be called from other scripts, without this particular class having any instance of itself (i.e., the script lives only in my 'Scripts' folder, and is not attached to any GO), which is why everything is set to 'static'. (That's my understanding of what 'static' does -- makes things available on a more global level as opposed to from an individual instance of something.) Can anyone help me understand what I'm doing wrong / missing here? Thanks!
(comments are locked)
|
|
I believe you need an instance to call then you just use Instance that you can call all the methods from. You might need to rework some code, but it isn't to hard to fix: And a small note on something else you said. Thanks... in the end I did not make the "Timer" class a singleton, but I did have to make another class of which I make an instance in order to run the countdown coroutine...
Jul 01 '11 at 05:15 PM
Dylan Cristy
(comments are locked)
|
