//didn't have this before?
 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 GameManager.
         Destroy(gameObject);
         return;
     }
 }
示例#2
0
 public void SetUpAssignmentMenu(UIAssignmentMenu am)
 {
     _AssignmentMenu = am;
 }
示例#3
0
 private void setUpMenu()
 {
     //this seems unnecessary
     _menu = UIAssignmentMenu.Instance;
 }