private void LoadLevel() { OnSwipeStartEvent.AddListener(OnSwipeStart); OnSwipeEndEvent.AddListener(OnSwipeEnd); moveCount = _currentLevel.MoveCount; CreateBoard(_currentLevel.Width, _currentLevel.Height); }
private void UnLoadLevel() { moveCount = 0; totalPoints = 0; transform.position = Vector3.zero; OnResetTileBackgroundEvent.Invoke(); OnSwipeEndEvent.RemoveAllListeners(); OnSwipeStartEvent.RemoveAllListeners(); OnTileInteractableChangedEvent.RemoveAllListeners(); OnResetTileBackgroundEvent.RemoveAllListeners(); StopAllCoroutines(); }
private IEnumerator WaitForSwipe(float time) { yield return(new WaitForSeconds(time)); OnSwipeEndEvent.Invoke(); }