예제 #1
0
 private void Start()
 {
     playerNear      = false;
     scoreText.color = Color.red;
     foreach (GameObject metric in GameObject.FindGameObjectsWithTag("metrics"))
     {
         if (metric.name.Equals(metricName))
         {
             coinMetric = metric.GetComponent <coinUpdate>();
         }
     }
 }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     layerMask      = 1 << 8;
     goalMask       = 1 << 11;
     blueCoinCount  = 0;
     greenCoinCount = 0;
     foreach (GameObject metric in GameObject.FindGameObjectsWithTag("metrics"))
     {
         if (metric.name.Equals("Score"))
         {
             blueScore = metric.GetComponent <coinUpdate>();
         }
         if (metric.name.Equals("greenScore"))
         {
             greenScore = metric.GetComponent <coinUpdate> ();
         }
     }
 }