예제 #1
0
 private void Update()
 {
     if (interval2 <= 0)
     {
         if (plant.Equals("Sunflower"))
         {
             Spawn();
         }
         else
         {
             if (GlobalVariables.ExistsZombie(plant, this.transform))
             {
                 Spawn();
             }
         }
         interval2 = interval;
     }
     else
     {
         interval2 -= Time.deltaTime;
     }
 }