public void SetConsumableValues(GameManager.Multiplier m) { foreach (Consumable c in sequenceConsumables) { switch (m) { case GameManager.Multiplier.None: c.value = c.originalValue; break; case GameManager.Multiplier.x2: c.value = (c.originalValue * 2); break; case GameManager.Multiplier.x3: c.value = (c.originalValue * 3); break; case GameManager.Multiplier.x4: c.value = (c.originalValue * 4); break; case GameManager.Multiplier.x5: c.value = (c.originalValue * 5); break; case GameManager.Multiplier.x6: c.value = (c.originalValue * 6); break; case GameManager.Multiplier.x8: c.value = (c.originalValue * 8); break; case GameManager.Multiplier.x10: c.value = (c.originalValue * 10); break; } } }
public void UpdateMultiplier(GameManager.Multiplier m, float mSize) { if (m == GameManager.Multiplier.None) { multiplier.text = ""; } else { //set the multiplier text multiplier.SetText(m.ToString()); } //set the new size if (multiplierTween != null) { multiplierTween.Kill(false); multiplierTween = null; } multiplierTween = multiplier.rectTransform.DOScale(Vector3.one * mSize, 1.0f); multiplierTween.OnComplete(() => { multiplierTween.Kill(true); multiplierTween = null; }); }