Ejemplo n.º 1
0
    private void LoadLevel()
    {
        OnSwipeStartEvent.AddListener(OnSwipeStart);
        OnSwipeEndEvent.AddListener(OnSwipeEnd);

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

        transform.position = Vector3.zero;

        OnResetTileBackgroundEvent.Invoke();

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

        OnSwipeEndEvent.Invoke();
    }