IEnumerator ElectryfyObsticle() { audioSource.PlayOneShot(startElectric); playManager.AddCoins(playManager.rewardForElectrycity); electricSparks.Play(true); rigidbodyThis.isKinematic = true; yield return(new WaitForSeconds(electryficationTime)); electricSparks.Stop(true); if (thisObsticleMovementType != ObsticleMovementType.None) { rigidbodyThis.isKinematic = false; } StartCoroutine(RandomizeMovement()); }
public void AddCoinsAfterAdd(int amount) { playManager.AddCoins(amount); }