Пример #1
0
 // Use this for initialization
 void Start()
 {
     scoreKeep = FindObjectOfType <LevelManger>();
     text      = GetComponent <Text>();
     score     = scoreKeep.getScore();
     Destroy(scoreKeep.gameObject);
 }
Пример #2
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.name == "Player")
     {
         levelManager.RespawnPlayer();
         LevelManger.RespawnPlayer();
     }
 }
Пример #3
0
 private void Start()
 {
     if (Instance == null)
     {
         Instance = this;
         PopulateGameBoard(20, 20);
     }
     else
     {
         Destroy(this);
     }
 }
Пример #4
0
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
         GameObject.DontDestroyOnLoad(gameObject);
     }
 }
Пример #5
0
 // Start is called before the first frame update
 void Start()
 {
     m_Instance = this;
     if (spawnManager != null)
     {
         spawnManager.Startspawner();
     }
     else
     {
         Debug.Log("SpawnManager is null");
     }
 }
Пример #6
0
 // Use this for initialization
 void Start()
 {
     levelManger = FindObjectOfType <LevelManger> ();
 }
 // Use this for initialization
 void Start()
 {
     levelManager = FindObjectOfType <LevelManger> ();
     text         = GetComponent <Text> ();
 }
Пример #8
0
 void Awake()
 {
     instance = this;
 }
Пример #9
0
 // Use this for initialization
 void Start()
 {
     scoreKeep = FindObjectOfType <LevelManger>();
     text      = GetComponent <Text>();
 }
 void Start()
 {
     scoreGoal = FindObjectOfType <LevelManger>();
 }