Created
June 22, 2014 03:55
-
-
Save MarianoGnu/765c54ed3da0129b9099 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #region Imports | |
| //-------------------------------------- | |
| // Imports | |
| //-------------------------------------- | |
| using UnityEngine; | |
| #endregion | |
| //-------------------------------------- | |
| // Namespace | |
| //-------------------------------------- | |
| namespace com.projects.MisilVsDEV.managers | |
| { | |
| #region Propiedades y Atributos | |
| //-------------------------------------- | |
| // Namespace Properties | |
| //-------------------------------------- | |
| //-------------------------------------- | |
| // Class Attributes | |
| //-------------------------------------- | |
| #endregion | |
| public class UiManager: MonoBehaviour | |
| { | |
| //-------------------------------------- | |
| // Variables | |
| //-------------------------------------- | |
| #region Variables | |
| // PUBLIC | |
| // PUBLIC STATIC | |
| // PRIVATE | |
| private GameObject _panelTransition; | |
| private GameObject _panelIntro; | |
| private GameObject _panelTitle; | |
| private GameObject _panelCredits; | |
| private GameObject _panelNewGame; | |
| private GameObject _panelJoinGame; | |
| private GameObject _panelConstruction; | |
| private GameObject _panelBattle; | |
| // PRIVATE STATIC | |
| private static UiManager _uiInstance = null; | |
| #endregion | |
| //-------------------------------------- | |
| // Getters & Setters | |
| //-------------------------------------- | |
| #region Getters & Setters | |
| public UiManager UiInstance | |
| { | |
| get | |
| { | |
| if(!_uiInstance) | |
| { | |
| _uiInstance = new UiManager(); | |
| } | |
| return _uiInstance; | |
| } | |
| } | |
| public GameObject PanelTransition | |
| { | |
| get | |
| { | |
| if(_uiInstance) | |
| return _uiInstance._panelTransition; | |
| else | |
| return new GameObject(); | |
| } | |
| set | |
| { | |
| if(_uiInstance) | |
| _uiInstance._panelTransition = value; | |
| } | |
| } | |
| public GameObject PanelIntro | |
| { | |
| get | |
| { | |
| if(_uiInstance) | |
| return _uiInstance._panelIntro; | |
| else | |
| return new GameObject(); | |
| } | |
| set | |
| { | |
| if(_uiInstance) | |
| _uiInstance._panelIntro = value; | |
| } | |
| } | |
| public GameObject PanelTitle | |
| { | |
| get | |
| { | |
| if(_uiInstance) | |
| return _uiInstance._panelTitle; | |
| else | |
| return new GameObject(); | |
| } | |
| set | |
| { | |
| if(_uiInstance) | |
| _uiInstance._panelTitle = value; | |
| } | |
| } | |
| public GameObject PanelCredits | |
| { | |
| get | |
| { | |
| if(_uiInstance) | |
| return _uiInstance._panelCredits; | |
| else | |
| return new GameObject(); | |
| } | |
| set | |
| { | |
| if(_uiInstance) | |
| _uiInstance._panelCredits = value; | |
| } | |
| } | |
| public GameObject PanelNewGame | |
| { | |
| get | |
| { | |
| if(_uiInstance) | |
| return _uiInstance._panelNewGame; | |
| else | |
| return new GameObject(); | |
| } | |
| set | |
| { | |
| if(_uiInstance) | |
| _uiInstance._panelNewGame = value; | |
| } | |
| } | |
| public GameObject PanelJoinGame | |
| { | |
| get | |
| { | |
| if(_uiInstance) | |
| return _uiInstance._panelJoinGame; | |
| else | |
| return new GameObject(); | |
| } | |
| set | |
| { | |
| if(_uiInstance) | |
| _uiInstance._panelJoinGame = value; | |
| } | |
| } | |
| public GameObject PanelConstruction | |
| { | |
| get | |
| { | |
| if(_uiInstance) | |
| return _uiInstance._panelConstruction; | |
| else | |
| return new GameObject(); | |
| } | |
| set | |
| { | |
| if(_uiInstance) | |
| _uiInstance._panelConstruction = value; | |
| } | |
| } | |
| public GameObject PanelBattle | |
| { | |
| get | |
| { | |
| if(_uiInstance) | |
| return _uiInstance._panelBattle; | |
| else | |
| return new GameObject(); | |
| } | |
| set | |
| { | |
| if(_uiInstance) | |
| _uiInstance._panelBattle = value; | |
| } | |
| } | |
| #endregion | |
| //-------------------------------------- | |
| // Methods | |
| //-------------------------------------- | |
| #region Methods | |
| // PUBLIC | |
| // PUBLIC STATIC | |
| // PRIVATE | |
| // PRIVATE STATIC | |
| // PRIVATE COROUTINE | |
| // PRIVATE INVOKE | |
| // PROTECTED CONSTRUCTOR | |
| protected UiManager() {} //El constructor protegido garantiza su uso como Singleton. | |
| #endregion | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment