public void Update() { if (Input.GetKeyDown(KeyCode.Space) || SwipeManager.IsSingleTap()) { spawnPortal(portal1, portal2); } else if (Input.GetKeyDown(KeyCode.LeftControl) || SwipeManager.IsDoubleTap()) { spawnPortal(portal2, portal1); } if (Input.GetKeyDown(KeyCode.Escape)) { SceneManager.LoadScene("Paused"); } Vector3 direction = inputToDirection(); safeMove(direction); }