// Checks collisions when a scoop has reached a new index private void CheckCollisions() { if (scoopStack.Count > 0) { return; } int index = HitStack(); if (index != -1) { // We've hit the stack board.AddScoopToCone(this); if (index != board.ConeStackHeight()) { MoveToIndex(new Vector2Int(board.ConeLane(), board.ConeStackHeight() - 1)); } audioManager.Play(audioSource, audioManager.ScoopLandAudio); // Can now be swiped left and right LeanTween.addListener(gameObject, (int)BoardManager.LeanTweenEvent.HorizontalSwipe, MoveScoopHorizontally); // Can no longer be frozen/unfrozen BoardManager.FreezeGame -= FreezeScoop; BoardManager.UnfreezeGame -= UnfreezeScoop; } else if (HitFloor() || HitMiddleStack()) { board.DropScoop(); Destroy(this.gameObject); } else { Fall(); } }