Beispiel #1
0
 public void Refresh()
 {
     for (int i = 0; i < slots.Length; i++)
     {
         if (!slots[i].ammo)
         {
             slots [i] = new AmmoSpawnSlot(slots[i].point);
         }
     }
     if (!IsInvoking("Refresh"))
     {
         Invoke("Refresh", 25);
     }
 }
Beispiel #2
0
 private void Start()
 {
     slots = new AmmoSpawnSlot[0];
     GameObject[] amPoints = GameObject.FindGameObjectsWithTag("AmmoPoint");
     slots = new AmmoSpawnSlot[amPoints.Length];
     for (int i = 0; i < slots.Length; i++)
     {
         slots [i] = new AmmoSpawnSlot(amPoints[i].transform);
     }
     if (!IsInvoking("Refresh"))
     {
         Invoke("Refresh", 0);
     }
 }