Difference between revisions of "Singleton Demo"

From Headbone Creative
Jump to: navigation, search
(Initial page)
 
(updated categories)
 
Line 6: Line 6:
 
In the scene, before the game is run, only the camera and the DemoGUI show up in the scene view. When you run the game, both the GameConfigDemo and ScoreKeeperDemo will show up in the hierarchy. You can use the GUI to change the values stored in the singletons; after changing the values using the GUI, you can click on the singletons in the hierarchy view and see the changes that you've made.  
 
In the scene, before the game is run, only the camera and the DemoGUI show up in the scene view. When you run the game, both the GameConfigDemo and ScoreKeeperDemo will show up in the hierarchy. You can use the GUI to change the values stored in the singletons; after changing the values using the GUI, you can click on the singletons in the hierarchy view and see the changes that you've made.  
  
[[Category:Demo]]
+
[[Category:Demos]]
 
[[Category:Free Scripts]]
 
[[Category:Free Scripts]]

Latest revision as of 02:37, 22 April 2013

This scene shows how both types of Singletons work. To drive this demo there are three additional scripts included in the Base script package.

  • GameConfigDemo - ResourceSingleton
  • ScoreKeeperDemo - MonoSingleton
  • SingletonDemo - GUI, shows how to access the singletons

In the scene, before the game is run, only the camera and the DemoGUI show up in the scene view. When you run the game, both the GameConfigDemo and ScoreKeeperDemo will show up in the hierarchy. You can use the GUI to change the values stored in the singletons; after changing the values using the GUI, you can click on the singletons in the hierarchy view and see the changes that you've made.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox