예제 #1
0
        private void GenerateSingleton()
        {
            if (GridManager.GetInstance() == null)
            {
                _instance = this;
            }
            else
            {
                Destroy(this);
                return;
            }

            DontDestroyOnLoad(gameObject);
        }
예제 #2
0
 private void Start()
 {
     _eventSys = GameObject.FindObjectOfType <EventSystem>();
     _grid     = GridManager.GetInstance();
     _cam      = GetComponent <Camera>();
 }