void Tap_Updated(GestureRecognizer gesture) { if (gesture.State == GestureRecognizerState.Began) { _ball = FingersUtilityExtensions.GetTouchedObject(gesture); if (_ball.CompareTag("Ball")) { _ball.GetComponent <Rigidbody2D>().velocity = Vector2.zero; _swipeController.enabled = false; } else if (_ball.CompareTag("BG")) { _swipeController.enabled = true; } if (_ball.GetComponent <BallController>() == null) { return; } _match3Controller._isFlicking = true; } if (gesture.State == GestureRecognizerState.Ended) { _match3Controller._isFlicking = false; } }
void Tap_Updated(GestureRecognizer gesture) { if (gesture.State == GestureRecognizerState.Began) { _ball = FingersUtilityExtensions.GetTouchedObject(gesture).GetComponent <GrabController>(); if (_ball.CompareTag("Ball")) { _ball.GetComponent <GrabController>().Expand(); } } if (gesture.State == GestureRecognizerState.Ended) { if (_ball == null) { return; } _ball.GetComponent <GrabController>().Shrink(); _ball = null; } }