Exemple #1
0
 void Awake()
 {
     countPointsAtLvl = 0;
     //Из DestroyByContact
     //Messenger.AddListener(GameEvent.ASTEROID_HIT, GetPoint);
     //Из HeadManager
     Messenger.AddListener(GameEvent.GAME_END, GameOver);
     if (GameObject.FindGameObjectWithTag("GameManager"))
     {
         hManager = GameObject.FindGameObjectWithTag("GameManager").transform.GetComponent <HeadManager>();
         if (hManager != null)
         {
             numberOfLvl         = hManager.CurrentLvl();
             countPointsSettings = hManager.CurrentPoins();
         }
         else
         {
             Debug.Log("Не нашел скрипт HedManager. GC");
         }
     }
 }