Example #1
0
 private void GetInput()
 {
     if (Input.GetKeyDown(spaceKey))
     {
         birdPhysics.Flap();
     }
 }
Example #2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Space))
        {
            birdPhysics.Flap();
        }

        if (!gameController.IsGameStarted &&
            transform.root.position.y <= 0)
        {
            birdPhysics.Flap();
        }
    }
Example #3
0
 private void Update()
 {
     if (Input.GetKeyDown(flapKey))
     {
         birdPhysics.Flap();
     }
 }
Example #4
0
    // Update is called once per frame
    private void Update()
    {
        //if (Input.GetKey(moveUp))
        //    translateMover.Move(Vector3.up);
        //if (Input.GetKey(moveLeft))
        //    translateMover.Move(Vector3.left);
        //if (Input.GetKey(moveDown))
        //    translateMover.Move(Vector3.down);

        if (Input.GetKeyDown(flapKey))
        {
            birdPhysics.Flap();
        }
    }
Example #5
0
 private void Flap()
 {
     birdPhysics?.Flap();
 }