private void Tap() { if (canTap) { Debug.Log("Tap"); canTap = false; StartCoroutine(AllowTap(TapCooldown)); AreaController.TurnOffOutline(); if (AreaController.wasOnOkayArea()) { Debug.Log("Tap on green area"); playerController.SetGoingUp(); } } }
//Handle button press void ButtonPress(int num) { Debug.Log("Button pressed with num " + num); canTap = false; StartCoroutine(AllowTap(TapCooldown)); AreaController.TurnOffOutline(); if (AreaController.wasOnOkayArea()) { if (!playerController.isMoving) { if (num == playerController.CurrentLine) { playerController.SetGoingUp(); } else { playerController.GoToStartOfLine(num); } } } }