Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     // Check for mouse down
     if (Input.GetMouseButtonDown(0))
     {
         // Flap the bird
         bird.Flap();
     }
     // Are there columns to move?
     if (Bird.columns.Count > 0)
     {
         if (Input.GetKey(KeyCode.UpArrow))
         {
             // move column up
             bird.MoveColumn(true);
         }
         if (Input.GetKey(KeyCode.DownArrow))
         {
             // move column down
             bird.MoveColumn(false);
         }
     }
 }