예제 #1
0
 // Update is called once per frame
 void Update()
 {
     // check for mouse down
     if (Input.GetKeyDown(KeyCode.Space))
     {
         bird.Flap();
     }
 }
예제 #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         // Flap the bird
         bird.Flap();
     }
 }
예제 #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
     }
 }
예제 #4
0
 // Update is called once per frame
 void Update()
 {
     // Check for mouse down
     if (Input.GetMouseButtonDown(0))
     {
         // Flap the Bird
         bird.Flap();
     }
 }
예제 #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
            }
        }
예제 #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);
         }
     }
 }
예제 #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();
        }