Ejemplo n.º 1
0
 private void onDrawingEnd(List <Vector2> _figureDots)
 {
     if (FigureAnalyzer.CompareFigures(_currentFigure.figureDots, _figureDots))
     {
         StopCoroutine(_turnCoroutinePointer);
         points += 1;
         _turnCoroutinePointer = StartCoroutine(turnCoroutine());
     }
     else
     {
     }
 }
Ejemplo n.º 2
0
    private void Start()
    {
        _saveDialog.SetActive(false);

        InputManager.Current.onDrawingEnd += (List <Vector2> _figureDots) =>
        {
            _saveDialog.SetActive(true);
            InputManager.Current.drawInputAllowed = false;


            _figurePreviev_base.updateFigure(FigureAnalyzer.Vector2ToVector3(_figureDots));
            _tempFigureDots = FigureAnalyzer.ComplexClusterizeProcess(_figureDots);
            _figurePreviev_clusterized.updateFigure(FigureAnalyzer.Vector2ToVector3(_tempFigureDots));
        };
    }
Ejemplo n.º 3
0
    private IEnumerator turnCoroutine()
    {
        _currentFigure = FigureSaveLoadManager.Current.loadRandomFigure();
        _figurePreviev.updateFigure(FigureAnalyzer.Vector2ToVector3(_currentFigure.figureDots));

        float _timer = currentTimer;

        currentTimer *= timerStepCoef;
        while (_timer > 0f)
        {
            yield return(new WaitForEndOfFrame());

            _timer         -= Time.deltaTime;
            _timerText.text = _timer.ToString("0.0");
        }

        gameOver();
    }