public bool OnCollision(Fixture a, Fixture b, Contact contact) { if (isActivated && b.isPlayer == true && !b.IsSensor) { foreach (SoundObject so in this.list) { if ((Sound2 is SoundObject)) { SoundObject so2 = (SoundObject)Sound2; if (so2.volume < so.volume) { so.Crossfade(so2, _Channel2Gain, _Channel1Loss, _fadeTime); } else { so2.Crossfade(so, _Channel2Gain, _Channel1Loss, _fadeTime); } } } isActivated = false; return(true); } else { return(false); } }