Exemple #1
0
 public void BirdMove()
 {
     string[] BirdTag = new string[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" };
     for (int i = 0; i < Birdnum && BirdliveNum > 0; i++)
     {
         Tm = GameObject.FindGameObjectWithTag(BirdTag[i]).GetComponent <BirdController>();
         if (Tm.BirdIslive)
         {
             Tm.Move();
         }
         else
         {
             if (Tm.flag)
             {
                 BirdliveNum--;
                 // Debug.Log(BirdliveNum);
                 Tm.flag = false;
             }
         }
     }
 }
    private void Update()
    {
        float vertical = Input.GetAxis("Vertical");

        _birdController.Move(vertical);
    }
Exemple #3
0
 void StartRound()
 {
     bird.Move();
     player.Move();
 }