public void ApplyMusic(float angle) { currentDebuff = new Ablaze(force * Time.deltaTime * coeff); foreach (GameObject coreling in fieldOfView.seenCorelings) { Demon demon = coreling.GetComponent <Demon>(); if (demon != null) { float angleFromMus = CustomLib.AngleFromPos(transform.position, demon.transform.position) - transform.rotation.eulerAngles.z; if (angleFromMus <= angle / 2f && angleFromMus >= -angle / 2f) { demon.AddDebuff(currentDebuff); } } } }