Example #1
0
    void Update()
    {
        if (start == true)
        {
            count++;
            if (count >= 80)
            {
                count = 0;

                if (DF == null)
                {
                    Debug.LogWarning("DF is NUll!");
                    return;
                }
                tral++;
                UFO d = DF.GetUFO(round);
                if (Manager == null)
                {
                    Debug.LogWarning("Manager is NULL!");
                }
                Manager.PlayUFO(d);
                if (tral == 10)
                {
                    round++;
                    tral = 0;
                }
            }
        }
    }
 public void Update()
 {
     if (times < 30 && flag == 0)
     {
         if (interval <= 0)
         {
             interval = Random.Range(3, 5);
             times++;
             int num = Random.Range(1, 4);
             for (int i = 0; i < num; i++)
             {
                 factory.produceUFO();
             }
         }
         interval -= Time.deltaTime;
     }
     actionManager.PlayUFO();
 }