private void GetInput() { if (Input.GetKeyDown(spaceKey)) { birdPhysics.Flap(); } }
// 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(); } }
private void Update() { if (Input.GetKeyDown(flapKey)) { birdPhysics.Flap(); } }
// 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(); } }
private void Flap() { birdPhysics?.Flap(); }