# OOP Best Practices - Global Booleans Method Question

**URL:** <https://forum.kirupa.com/t/oop-best-practices-global-booleans-method-question/320090>\
**Category:** flash\
**Created:** [March 14, 2011, 5:14am UTC](https://forum.kirupa.com/t/oop-best-practices-global-booleans-method-question/320090 "2011-03-14T05:14:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bisket](https://avatars.discourse-cdn.com/v4/letter/b/87869e/32.png) [@bisket](https://forum.kirupa.com/u/bisket)\
**Post date:** [March 14, 2011, 5:14am UTC](https://forum.kirupa.com/t/oop-best-practices-global-booleans-method-question/320090/1 "2011-03-14T05:14:37Z")

</div>

Hey folks,

Before anything I gotta say how wonderful this community always is and has been.

I have a game that is using many classes. I’d like my classes to be self-sustaining, to a point.

Example: I have a Reticule class that shows a custom cursor. It has methods such as startCustomCursor(), stopCustomCursor(), showMouse() and hideMouse().

I’m using a class called Globals that stores several public static vars (mainly booleans) that mainly is used for other classes to reference to see what state certain things are in.

So in my game, if the game is running, IS\_GAME\_OVER = false, but as soon as the end game screen comes up it is set to, IS\_GAME\_OVER = true. Instead of an outside method telling the Reticule class to stop showing the custom cursor and bring the mouse back. Would it be a standard practice to have a constant Event.ENTER\_FRAME running that, in the Reticule class, is checking the IS\_GAME\_OVER boolean, if true do nothing else do what needs to be done.

This should all make sense, but if not, let me know. Thanks for any help/guidance you can offer.

Thanks!
