Question by
noeloskar99 · Oct 14, 2018 at 05:07 PM ·
c#collidersound
I need a help with enemy sound
Hello!
i was working on my 2d game and i making the script what plays sound of enemy when you are too close
but i have issue and when i go to the enemy sound play area sound is playing just once. and when i exit it the sound doesn't stop playing
public AudioSource ScarySound;
void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == "Player1")
{
ScarySound.Play();
}
}
Sorry for my bad english. english is not my native launguage
and im very thankfull if you help me :)
Comment
Your answer