Beispiel #1
0
    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());
    }
Beispiel #2
0
 public void AddCoinsAfterAdd(int amount)
 {
     playManager.AddCoins(amount);
 }