public int Add(int amount) { moves++; if (amount == 0) { AddMulti(); return(0); } var amt = (int)Mathf.Pow(amount, 2) * multiplier; addition.text = "+" + amt; additionAppearer.Show(); this.StartCoroutine(() => { score += amt; pulsater.Pulsate(); additionAppearer.Hide(); ClearMulti(); }, 2f); return(amt); }
public void Boom(Color color) { var p = transform.position; const float vol = 0.4f; AudioManager.Instance.PlayEffectAt(Random.Range(4, 8), p, 1.1f * vol); AudioManager.Instance.PlayEffectAt(10, p, 0.6f * vol); letterText.color = color; EffectManager.Instance.AddEffect(2, transform.position); Invoke(nameof(DoBoom), boomDelay); letterPulsater.Pulsate(); }