- Home /
Question by
bechirzich · Mar 11, 2018 at 08:47 PM ·
c#unity 2d
Play sound once on collision
hello i have problem with sound effect when the object dead (collision) the sound keep playing till the gameobject stop how can i fix that
private void OnCollisionEnter2D(Collision2D collison)
{
dead = true;
Gamecontrole.instance.BalloonDied ();
over.SetActive (true);
animator.SetTrigger ("fly3");
source.PlayOneShot (explose, 1f);
}
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Cinemachine follow Player but also focus on trajectory 0 Answers
Brackeys EnemyAi Script 0 Answers