public IEnumerator ShowMultiplier(int multiplier) { GameManager.Instance.Definitions.HudMultiplier.SetActive(true); if (_multiplierLabel == null) { _multiplierLabel = GameManager.Instance.Definitions.HudMultiplier.GetComponentInChildren <ShadowLabel>(); } _multiplierLabel.text = multiplier.ToString() + "x"; float time = GameManager.Instance.Definitions.MultiplierTime; Effects.TweenColor(GameManager.Instance.Definitions.HudMultiplier, time, new Color(1, 1, 1, 0), Tweener.Method.EaseIn); ScaleTween tweenScale = ScaleTween.Begin(GameManager.Instance.Definitions.HudMultiplier, time, Vector3.one * 4); tweenScale.method = Tweener.Method.EaseIn; yield return(new WaitForSeconds(time)); Effects.TweenColor(GameManager.Instance.Definitions.HudMultiplier, 0, Color.white, Tweener.Method.EaseIn); ScaleTween.Begin(GameManager.Instance.Definitions.HudMultiplier, 0, Vector3.one); GameManager.Instance.Definitions.HudMultiplier.SetActive(false); }
public void TweenScale(float duration, Vector3 scale, Tweener.Method method) { ScaleTween tweenScale = ScaleTween.Begin(gameObject, duration, scale); tweenScale.method = method; }