private void OnSwipeEnd() { moveCount -= 1; EvaluateSwipe(_currentTile.ArrayIndex, _targetTile.ArrayIndex); OnTileInteractableChangedEvent.Invoke(moveCount != 0); GameManager.Instance.OnGameHudUpdateEvent.Invoke(moveCount, totalPoints); if (moveCount == 0) { // Debug.Log("Level is done, and your points: " + totalPoints); GameManager.Instance.OnLevelResultEvent.Invoke(totalPoints, _currentLevel.LevelNumber); } }
private void UnLoadLevel() { moveCount = 0; totalPoints = 0; transform.position = Vector3.zero; OnResetTileBackgroundEvent.Invoke(); OnSwipeEndEvent.RemoveAllListeners(); OnSwipeStartEvent.RemoveAllListeners(); OnTileInteractableChangedEvent.RemoveAllListeners(); OnResetTileBackgroundEvent.RemoveAllListeners(); StopAllCoroutines(); }
private void OnSwipeStart() { OnTileInteractableChangedEvent.Invoke(false); }