Esempio n. 1
0
    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);
        }
    }
Esempio 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();
    }
Esempio n. 3
0
 private void OnSwipeStart()
 {
     OnTileInteractableChangedEvent.Invoke(false);
 }