// Update is called once per frame protected override void PostUpdate() { //the time is ticking if the hitbox is active if (timer.TickTimer()) { //query collisions if the hitbox is supposed to be active boxCollider.OverlapCollider(filter, curColliding); diffColliders = curColliding.Except(wasColliding).ToList(); wasColliding = curColliding.ToList(); int len = diffColliders.Count; if (len > 0) { for (int i = 0; i < len; i++) { Hurtbox box = curColliding[i].GetComponent <Hurtbox>(); if (box.GetAllignment() != allignment) { box.GetHit(); player.OnHit(data); } } } } }