Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

sound buzzing enemy dies

$
0
0
sound is buzzing when enemy dies but when pause is shortened sound is played too quick var EnemyHealth : int = 10; var soundFile : AudioClip; function DeductPoints (DamageAmount : int) { EnemyHealth -= DamageAmount; } function Update () { if (EnemyHealth <= 0) { GetComponent.().clip = soundFile; GetComponent.().Play(); Destroy(gameObject, 1); } }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>