Grey's tutorial: StandAlone

edited June 2012 in Help request
Query.

In Grey's tutorial, he makes an Instance(); function.

Considering this class is purely static, and Instance is never called, this function, and the static StandAlone* m_Instance, seem irrelevant.

Because the class is static it works as a singleton anyway, so the result is the same, but what it's trying to do seems redundant.

Comments

  • edited June 2012
    Like quite a few things in those tutorials, the intent is to write things once, so that at a later point, when I do start making use of them, I don't have to go back and rewrite.

    It is not necessary, and you are most welcome to change it for yourself if you wish! :)
  • edited June 2012
    Isn't it better then to change the public static functions to simply call on instance()->nonstatic private functions so you can use nonstatic variables in the class?

    EDIT: i still think it's better to delete the instance function in the tutorial for clarity sake, you can always make another tutorial explaining it if you need it.
    And yes, i could change it, but i think it bad sport to change other peoples tutorials.
  • edited June 2012
    Just so you know, I've added a warning to your 4th tutorial about the GetMousePos function. It's fine for a tutorial, but if someone ends up having trouble... (See also the other help thread I've made)
Sign In or Register to comment.