Пример #1
0
 void Awake()
 {
     Current     = this;
     _cellT      = (GameObject)Resources.Load("Prefabs/Cell", typeof(GameObject));
     _unitT      = (GameObject)Resources.Load("Prefabs/Unit", typeof(GameObject));
     _cellHolder = new GameObject("CellHolder");
 }
Пример #2
0
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        sceneNum  = SceneManager.GetActiveScene().buildIndex;
        levelPass = PlayerPrefs.GetInt("levelPass");
    }
Пример #3
0
 void Awake()
 {
     if (instance != null)
     {
         if (instance != this)
         {
             Destroy(this.gameObject);
         }
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(this);
     }
 }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        pauseMenuUI.SetActive(false);

        sceneIndex  = SceneManager.GetActiveScene().buildIndex;
        levelPassed = PlayerPrefs.GetInt("LevelPassed");
    }
Пример #5
0
 void Awake()
 {
     levelCtrl = this;
 }
Пример #6
0
 private void Start()
 {
     levelCtrl = LevelCtrl.instance;
 }
Пример #7
0
 void Awake()
 {
     Current = this;
     _cellT = (GameObject)Resources.Load("Prefabs/Cell", typeof(GameObject));
     _unitT = (GameObject)Resources.Load ("Prefabs/Unit", typeof(GameObject));
     _cellHolder = new GameObject("CellHolder");
 }