private void Awake()
 {
     if (instance == null)
     {
         //if not, set instance to this
         instance = this;
     }
     //If instance already exists and it's not this:
     else if (instance != this)
     {
         //Then destroy this. This enforces our singleton pattern, meaning there can only ever be one instance of a UICrossHairController.
         Destroy(gameObject);
         return;
     }
 }
Ejemplo n.º 2
0
 private StateControllersManager()
 {
     controllers.Add(KeystrokeStateController.GetStateController());
     controllers.Add(MouseStateController.GetStateController());
 }
Ejemplo n.º 3
0
 private MouseManager()
 {
     controller             = MouseStateController.GetStateController();
     mouseClickEventsBuffer = new List <MouseClickEvent>();
 }