public void DealDamage(int dmg) { // Recalculate health and UI health -= dmg; redrawUIHearts(); eac.PlayHurt(); if (health <= 0) { loseGame(); } GameObject controller = GameObject.FindGameObjectsWithTag("Controller")[0]; if (controller != null) { CoinMultiplier cm = controller.GetComponent <CoinMultiplier>(); cm.Reset(); } }
void ForceUpdate() { Reset(); smu.UpdateWorld(); cm.Reset(); }