public void OnExit(DoButton doButton) { isOverButton = false; _tween.Kill(); _tween = doButton.GetButton.image.DOColor(doButton.GetButton.image.color, 1f); }
public void OnUp(DoButton doButton) { _tween.Kill(); _tween = DOTween.Sequence() .Join(doButton.GetButton.transform.DOScale(Vector3.one, 0.42f)) .Join(doButton.GetButton.image.DOColor(DecideColor(doButton), 0.42f)) .OnComplete(doButton.Execute); }
public void OnDown(DoButton doButton) { var growthVector = new Vector3(1 + scaleAmount * 0.1f, 1 + scaleAmount * 0.1f, 1); _tween.Kill(); _tween = DOTween.Sequence() .Join(doButton.GetButton.transform.DOScale(scaleAmount, 0.42f)) .Join(doButton.GetButton.image.DOColor(doButton.GetButton.colors.pressedColor, 0.42f)); }
public void OnEnter(DoButton doButton) { isOverButton = true; if (originalColor.Equals(dummyColor)) { originalColor = doButton.GetButton.image.color; } if (_tween != null && _tween.IsActive()) { _tween.Kill(); } _tween = doButton.GetButton.image.DOColor(doButton.GetButton.colors.normalColor, 0.42f); }
private Color DecideColor(DoButton doButton) { return(doButton.GetButton.colors.normalColor); }