Example #1
0
    private void LoadLevel()
    {
        OnSwipeStartEvent.AddListener(OnSwipeStart);
        OnSwipeEndEvent.AddListener(OnSwipeEnd);

        moveCount = _currentLevel.MoveCount;
        CreateBoard(_currentLevel.Width, _currentLevel.Height);
    }
Example #2
0
    private void UnLoadLevel()
    {
        moveCount   = 0;
        totalPoints = 0;

        transform.position = Vector3.zero;

        OnResetTileBackgroundEvent.Invoke();

        OnSwipeEndEvent.RemoveAllListeners();
        OnSwipeStartEvent.RemoveAllListeners();
        OnTileInteractableChangedEvent.RemoveAllListeners();
        OnResetTileBackgroundEvent.RemoveAllListeners();
        StopAllCoroutines();
    }
Example #3
0
    private IEnumerator WaitForSwipe(float time)
    {
        yield return(new WaitForSeconds(time));

        OnSwipeEndEvent.Invoke();
    }