Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Getting Data to a Singleton's Constructor  (Read 1332 times)
0 Members and 1 Guest are viewing this topic.
Offline Iron Eye

Junior Newbie

« Posted 2006-01-02 07:32:36 »

I'm trying to make a SpriteStore singleton which has a reference to my main graphics class.  The SpriteStore will then, in turn, give each Sprite a reference to the graphics class.  In this manner I hope to simplify drawing, as well as make future changes simplified by centralizing all of the graphics operations.   Each sprite will make calls to the graphics class on its own, without the user worrying about it. 

If it turns out that I cannot do this, I suppose I'll have to have the graphics class simply take sprite objects and/or entities and resolve the image object itself.  The solution sounds dirty to me.  I couldn't think of any other alternatives though.

Any help would be appreciated.

8: Undefined index: online
File: /home/jgo/public_html/Themes/default/Display.template.php (main sub template - eval?)
Line: 161