Exemplo n.º 1
0
 private void InitializeVariablesAndGetReferences()
 {
     possibleEnemies     = new List <TypeOfEnemy>();
     typeOfEnemyToPrefab = new Dictionary <TypeOfEnemy, GameObject>();
     mutationManager     = GetComponent <EnemyMutationManager>();
     InitializePossibleEnemies();
 }
 private void MakeThisObjectSingleton()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
 }