Ejemplo n.º 1
0
    public void GoUp()
    {
        if (_at <= 0)
        {
            TopReached?.Invoke(this, EventArgs.Empty);
            return;
        }

        newPosition.y -= step;
        StopAllCoroutines();
        StartCoroutine(AnimateMove());
        _at--;
        UpdateButtons();
    }
Ejemplo n.º 2
0
    public bool GoUp()
    {
        if (_at - 1 < 0)
        {
            TopReached?.Invoke(this, EventArgs.Empty);
            return(false);
        }

        children[_at - 1].GetComponent <Button>().onClick?.Invoke();

        StopAllCoroutines();
        StartCoroutine(AnimateMove());


        return(true);
    }