Skip to content

Commit

Permalink
Feat: add shortcut keys (space, enter)
Browse files Browse the repository at this point in the history
  • Loading branch information
0dOj committed May 15, 2022
1 parent ec03c89 commit c9405e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Scripts/BirdControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void Start()
// Update is called once per frame
void Update()
{
if(Input.GetMouseButtonDown(0))
if(Input.GetMouseButtonDown(0) || Input.GetKeyDown(KeyCode.Space) || Input.GetKeyDown(KeyCode.Return))
{
gameObject.GetComponent<Rigidbody2D>().velocity = new Vector2(0, 0);
gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(0, 250));
Expand Down

0 comments on commit c9405e0

Please sign in to comment.