private void Update() { if (Input.GetKeyDown(KeyCode.Q)) { donut.JumpRight(); } else if (Input.GetKeyDown(KeyCode.E)) { donut.JumpLeft(); } }
private IEnumerator AICoroutine() { while (true) { yield return(new WaitForSeconds(TimeBetweenLogicTicks)); if (gameController.Sphere != null) { if (gameController.Sphere.transform.position.y > transform.position.y) { if (gameController.Sphere.transform.position.x < transform.position.x) { hoop.JumpLeft(); } else { hoop.JumpRight(); } } } } }