public void GoUp() { if (_at <= 0) { TopReached?.Invoke(this, EventArgs.Empty); return; } newPosition.y -= step; StopAllCoroutines(); StartCoroutine(AnimateMove()); _at--; UpdateButtons(); }
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); }