Ejemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     // check for mouse down
     if (Input.GetKeyDown(KeyCode.Space))
     {
         bird.Flap();
     }
 }
Ejemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         // Flap the bird
         bird.Flap();
     }
 }
Ejemplo n.º 3
0
 // Update is called once per frame
 void Update()
 {
     // check for mouse down
     if (Input.GetMouseButtonDown(0))
     {
         bird.Flap();                    // Bird will now flap wings
     }
 }
Ejemplo n.º 4
0
 // Update is called once per frame
 void Update()
 {
     // Check for mouse down
     if (Input.GetMouseButtonDown(0))
     {
         // Flap the Bird
         bird.Flap();
     }
 }
Ejemplo n.º 5
0
 // Update is called once per frame
 void Update()
 {
     if (bird.isDead == false)
     {
         // Check for mouse down
         if (Input.GetMouseButtonDown(0))
         {
             // Flap the bird
             bird.Flap();
         }
     }
 }
        // Update is called once per frame
        void Update()
        {
            // Check for mouse down

            if (Input.GetButtonDown("Jump"))
            {
                // Flap the bird
                bird.Flap();
            }

            if (Input.GetButtonDown("Fire1"))
            {
                //Damage object
            }
        }
Ejemplo n.º 7
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);
         }
     }
 }
Ejemplo n.º 8
0
        public void PlayGame(int height, int width)
        {
            this.height = height;
            this.width  = width;

            Console.CursorVisible = false;
            ConsoleKey action = ConsoleKey.H;

            gameOver = false;
            do
            {
                //while (action != ConsoleKey.Q)
                //{
                if (gameOver != true)
                {
                    action = Console.ReadKey().Key;
                    if (action == ConsoleKey.UpArrow)
                    {
                        bird.Flap();
                        //Step();
                        //render.DrawScreen(state, height, width);
                    }
                }
                //}
            }while (gameOver != true);



            //do
            //{
            //    Step();

            Console.Clear();
            Console.SetCursorPosition(39, 19);
            Console.WriteLine("Game Over!");
            Console.ReadKey();
        }