示例#1
0
 void Awake()
 {
     countLife       = 3;
     rbShip          = GetComponent <Rigidbody>();
     playersColl     = GetComponent <MeshCollider>();
     cashTimeWaitHit = timeWaitHit;
     if (GameObject.FindGameObjectWithTag("GameManager"))
     {
         hManager = GameObject.FindGameObjectWithTag("GameManager").transform.GetComponent <HeadManager>();
         if (hManager == null)
         {
             Debug.Log("Отсутствует скрипт HeadManager. PController");
         }
         else
         {
             hManager.GetPlayer(this);
         }
     }
 }